You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I log in using Postman and save the token in an HTTP-only cookie, I can create a new request where authorization is required, and it works very well.
However, I don't know how to set up the API to work with Nuxt 3 requests ($fetch) because I get a 401 error (Unauthorized).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I log in using Postman and save the token in an HTTP-only cookie, I can create a new request where authorization is required, and it works very well.
However, I don't know how to set up the API to work with Nuxt 3 requests ($fetch) because I get a 401 error (Unauthorized).
Here are some parts of my code:
Login endpoint: https://snipboard.io/t31oiv.jpg
CORS settings: https://snipboard.io/kiCRqA.jpg
JWT settings: https://snipboard.io/8Oo2PD.jpg
Beta Was this translation helpful? Give feedback.
All reactions