Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to login on self hosted #1353

Open
jaiveertalwar opened this issue Oct 30, 2024 · 2 comments · May be fixed by #1490
Open

Unable to login on self hosted #1353

jaiveertalwar opened this issue Oct 30, 2024 · 2 comments · May be fixed by #1490

Comments

@jaiveertalwar
Copy link

I’ve deployed to Vercel with a domain mydomain.com and the wildcard too. When I open app.mydomain.com I get a 404 from Papermark. I can open the branch url, papermark-git-main-iwueuwnd.vercel.app and then I see the login page, but when I click the link in the email nothing happens, the same login page pops up.

What should I do.

Thanks.

@zolfariot zolfariot linked a pull request Feb 13, 2025 that will close this issue
@zolfariot
Copy link

I had the same issues, thus I was deploying on traditional server and not on Vercel. The 404 error is due to some hardcoded hostname-matching login in the middleware.ts file. The redirect to the login page is due to the session cookie being rejected from the browser because having the wrong domain hardcoded.

With the changes I proposed in #1490 I was able to successfully login on selfhosted instances (haven't tried Vercel deployment though).

Nevertheless, to get a fully complete selfhosted instance other tweaks in the codebase are required, I will try to send other PR when I have time if the project seems receptive to improve the selfhosting experience.

I guess they will be happy to offer commercial support on selfhosting.

@mpadronm90
Copy link

mpadronm90 commented Feb 14, 2025

Having the same problem.

Something I found is that the custom domain you set in these variables gets blocked (404).

NEXTAUTH_URL=http://localhost:3000
NEXT_PUBLIC_BASE_URL=http://localhost:3000

So weird!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants