Closed quacksire closed 8 months ago
If you're getting an invalid URL string error its most likely to do with building to URL to redirect to get authenticated. The URL is built from some env variables - so it might be worth double checking that the .env variables are being set
Hey @quacksire did @peterphanouvong's comment help to resolve this or do you still need some assistance?
Sorry about the delay, getting back into the swing of things after the holidays.
I readjusted the env vars to the URL it was being deployed on as @peterphanouvong and I still ran into the same issue.
Still not sure I know what's happening, and I can give access to the repo if needed.
Here's my .env
Here's my implementation of Sign In:
Here's my NextConfig
Here's my package.json
Here's my Vercel build settings (default Next.js preset)
Hey @quacksire, sorry you're still running into this issue - have you seen this video? https://www.youtube.com/watch?v=ZNuE7CkB6ck.
It may help with making sure that you have vercel set up with the correct .env variables for deployment
Following the video's guide, it worked successfully.
It was my mistake, I did not add or update the environment variables on the deployment platform (Vercel, Cloudflare Pages, etc)
Even though I deployed it with the .env
file, which is not recommended anyway, it was not picked up by the deployment and was ignored by KindeSDK until I added the environment variables to that deployment's project on Vercel/Cloudflare Pages.
The issue was infuriatingly simple, but I appreciate the help nonetheless.
Prerequisites
Describe the issue
When deployed to CF Pages via the @cloudflare/next-on-pages package, user requests to
/api/auth/[kindeAuth]
are not resolved correctly and show a "Internal Server Error"This does not happen in development and seems to also affect Vercel deployments as well.
CF Pages Log:
User Facing:
Library URL
https://github.com/kinde-oss/kinde-auth-nextjs
Library version
2.0.13
Operating system(s)
macOS
Operating system version(s)
14.2 Beta (23C5030f)
Further environment details
No response
Reproducible test case URL
No response
Additional information
There are no changes to the library or any special changes to how this library is implemented.
The most recent docs have followed word for word and since the entire auth flow works on development, I can assume I set it up correctly
I can share my project on a person-by-person basis