Kinde Auth Register 404
In production I always get this error. It seems sometimes like the users try to click multiple times. What can cause this error? When does the callback get called? After they actually tried to signup or before? I also have a custom auth callback api route can cause this anything?
32 Replies
The sometimes I see this directly after the 404.
Let me get the team to look into this @Bandinho what Kinde SDK are you using?
Where to see this?
Which one of these docs did you follow?
I actually set up kinde from Josh, a YouTuber with his quill project using Kinde auth. I use Nextjs with typescript
Ok, what version of the Kinde SDK did you use?
I can’t check it now because I am an mobile but I started installing kinde around end October. Think since then I didn’t update anything
I general I think registrations kind of works but maybe not every time. I don’t know but loosing many new users by this is not good
I just saw in the docs is different code than mine
When you are back behind your computer please update your Kinde SDK package to the latest version of v2.0.13. Just wanted to check if you are using Vercel for deployment? If so, this video will help step through the process https://youtu.be/ZNuE7CkB6ck?si=FEnmGjBiURRAc6iz
Kinde
YouTube
How to deploy a Kinde Next.js app with Vercel
Software engineer Peter takes you through how to deploy a Kinde app using Vercel, and covers the common pitfalls involved.
00:00 - App demo
0:46 - Creating a project on Vercel
1:19 - Initialising Github repo
2:49 - Setting up environment variables on Vercel
4:00 - Deploying and visiting the app on the Vercel Domain
5:13 - Updating environment ...
Maybe update to new sdk
Yes I do
Thanks I will try to do Tomorrow and let you know if it works then
Sounds good, let us know how you go 😄
How to update in general your sdk?
Is there a command line prompt for this? I am kind of a beginner with using sdks etc. I also should update other projects sdks probably 😅
Run the command npm update @Kinde-oss/kinde-auth-nextjs to update the SDK.
Always happy to help
Thanks man
Here it worked for a user
And then sometimes I see this?
I updated to newest sdk
The error is still here :/
I get this 404 error everything on register login and logout.
On safari I didn’t have this, on chrome for example I got 404 and then 307 so that also kind of works but short period I saw blank page
Would be really nice because I think I lost many many users because of this error. Just last hour 10 warnings 404 and only saw 1 time a 307 and then it only works for the users. I also see several times users try many times to click and register.. but they always make the 404 warning.. and leave the page 😦
How can we fix this? Can this be related to me code? If so I can share access.
Sorry about the delay @Bandinho I am getting a team member to look into this for you
Hey @Bandinho, I think the sign up and sign in is working properly on studypdf.net.
I suspect the 404 is happening due to Nexjs Link prefetch - the
_rsc=acgkz...
part of the URL is indicating that there is a prefetch happening. I'm not 100% sure why its giving a 404 since the route definitely exists, but I suspect that because it's an API route its not responding with the what the prefetch is expecting (probably a page).
What does the code for your Register link look like?
It may just be a matter of adding prefetch={false}
to the LinkThis os for my PC navbar:
And this for mobile Nav:
But what causes the error that sometimes I onkly see a 404 not found and sometimes I see directly after the 404 also a 307?
This is the full error 404: [GET] /api/auth/register?_rsc=62voe&nxtPkindeAuth=register status=404
And sometimes then I see 307: [GET] /api/auth/register?nxtPkindeAuth=register status=307
I made now the changed everywherew the refech={false}
The thing that brings me headaches that I see many times only the 404 in logs and no 307 at all.
Within 30 seconds
I got this from a user who asked friend to register
I also tracked now register button click and I clearly see many try several times to register 😶
Sorry its taken me a while to come back around to this
What happens at the
sign-up
route?if you are redirecting, may need to use this: https://nextjs.org/docs/app/api-reference/functions/permanentRedirect
Functions: permanentRedirect | Next.js
API Reference for the permanentRedirect function.
Saw This from Josh Tutorial from quill
Why do I get there then a 307 instead of 308 if the redirect worked for a user.
The 404 error ONLY appers when Not using Register/Login/Logout Link