DEV Community

Discussion on: Next.js authentication with existing backend

Collapse
dwalker93 profile image
Adam Walker

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?

Collapse
szymkab profile image
Szymon Kabelis Author

Hi, do you want to send requests from Next.js client (browser react app) or server?

Collapse
dwalker93 profile image
Adam Walker

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 ?