Recently I was working on some Next.js project and came to issues regarding the authentication using a built-in Next.js server and the existing bac...
For further actions, you may consider blocking this person and/or reporting abuse
Hi guys, if you need the token in an axios request, do it like this!
Will have to say, it's much easier to pull in a package such as federated auth to do this automatically. You don't need to set anything extra or understand how JWTs are supported to work to make sure the UI app works correctly.
Well, I would say using next-auth doesn't require knowing JWTs but I've included that in the post because I think it's always better to know at least something about what you are using...
Sure, but it's better than to put that as the perspective in the article. "Hey, this is difficult, there are packages to handle it, and here we are going to dive into why these packages exist and what they are providing."
Quite an aggressive way of referring others to your own package. Thank you @szymkab for the simple concept.
Hey Szymon this is great article.. But using this how to send authenticated requests to another server?
For example next app in client and main express graphql api in another api path. how to send authenticated request to other server?
Hi, do you want to send requests from Next.js client (browser react app) or server?
yeah for example my front next js app in client folder and backend express graphql server in server folder. I can set token as a header when request from next to graphql api. but how to decode that jwt in graphql api ?
Hi
great info, Could also tell how we can do NextAuth Google login with exisitng backend API as backend API releases its own token.
Hello, is it possible to use this method for authentication with existing backend, but with other providers, such as google, twitter...
Thanks in advance