Im having 401 in http://localhost:3001/api/auth/setup when using browserClient hooks for the front
This doesnat make sense, ofcourse user is not auth yet, why this error is poping up then?
6 Replies
Hi @DavidF9265,
What Kinde SDK are using?
I am a little confused, since if the user is trying to access resource that they don't have permissions for or requires authentication, than a 401 error is valid. Are you able to explain a bit more about your issue?
i mean, its kind of confusing for us having an error popped up on our app, when no one is actually trying to do anything. Its just the home page, we don't think an error should pop up
we found out an issue is opened on kinde repo about this, i guess there could be a better way to handle this state
GitHub
Bug:
/api/auth/setup
is failing with 401 Unauthorized · Issue #17...Prerequisites I have searched the repository’s issues and Kinde community to ensure my issue isn’t a duplicate I have checked the latest version of the library to replicate my issue I have read the...
what do you think about wrapping the refreshData logic in a try catch block so that the output can be standarized in a different way for unauthorized on setup endpoint?
i guess this might be a misunderstanding on us. Please let us know
thanks for your reply @Oli - Kinde
Hi @DavidF9265,
Thanks for explaining more about your issue. I totally understand now how this is an issue for your app.
I can see you commented on the https://github.com/kinde-oss/kinde-auth-nextjs/issues/170 GitHub issue too.
Can you please post your comments and suggestions above in the issue too?
A member of my team will respond to you in the GitHub issue when they can.
GitHub
Bug:
/api/auth/setup
is failing with 401 Unauthorized · Issue #17...Prerequisites I have searched the repository’s issues and Kinde community to ensure my issue isn’t a duplicate I have checked the latest version of the library to replicate my issue I have read the...
great! thanks a lot!