K
Kinde12mo ago
Bandinho

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?
No description
32 Replies
Bandinho
BandinhoOP12mo ago
The sometimes I see this directly after the 404.
No description
onderay
onderay12mo ago
Let me get the team to look into this @Bandinho what Kinde SDK are you using?
Bandinho
BandinhoOP12mo ago
Where to see this?
onderay
onderay12mo ago
Which one of these docs did you follow?
No description
Bandinho
BandinhoOP12mo ago
I actually set up kinde from Josh, a YouTuber with his quill project using Kinde auth. I use Nextjs with typescript
onderay
onderay12mo ago
Ok, what version of the Kinde SDK did you use?
Bandinho
BandinhoOP12mo ago
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
Bandinho
BandinhoOP12mo ago
No description
Bandinho
BandinhoOP12mo ago
I just saw in the docs is different code than mine
onderay
onderay12mo ago
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 ...
Bandinho
BandinhoOP12mo ago
Maybe update to new sdk Yes I do Thanks I will try to do Tomorrow and let you know if it works then
onderay
onderay12mo ago
Sounds good, let us know how you go 😄
Bandinho
BandinhoOP12mo ago
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 😅
onderay
onderay12mo ago
Run the command npm update @Kinde-oss/kinde-auth-nextjs to update the SDK. Always happy to help
Bandinho
BandinhoOP12mo ago
Thanks man
Bandinho
BandinhoOP12mo ago
Here it worked for a user
No description
Bandinho
BandinhoOP12mo ago
And then sometimes I see this?
No description
Bandinho
BandinhoOP12mo ago
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.
onderay
onderay12mo ago
Sorry about the delay @Bandinho I am getting a team member to look into this for you
peteswah
peteswah12mo ago
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 Link
Bandinho
BandinhoOP12mo ago
No description
Bandinho
BandinhoOP12mo ago
This os for my PC navbar:
No description
Bandinho
BandinhoOP12mo ago
And this for mobile Nav:
No description
Bandinho
BandinhoOP12mo ago
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.
Bandinho
BandinhoOP12mo ago
Within 30 seconds
No description
Bandinho
BandinhoOP12mo ago
I got this from a user who asked friend to register
No description
Bandinho
BandinhoOP12mo ago
No description
Bandinho
BandinhoOP12mo ago
I also tracked now register button click and I clearly see many try several times to register 😶
peteswah
peteswah12mo ago
Sorry its taken me a while to come back around to this What happens at the sign-up route?
peteswah
peteswah12mo ago
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.
Bandinho
BandinhoOP12mo ago
No description
Bandinho
BandinhoOP12mo ago
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
Want results from more Discord servers?
Add your server