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
So I use in my frontend Next Js, and i have a separated express js server that has some endpoints that should be protected only for authorized users.
So my question is, after authenticated on next js (using a custom provider I made), how can i laverage it for express js know that I'm authenticated?
I was thinking to deliver via cookie the encrypted session to the express js so the express js can decrypt it and get the user from it.
The thing is, I'm not sure if it's possible to send it with cookie to another server because it sits on different domain and by default cookies are only saved for a specific origin no? and also, are there other methods i can use?
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
So I use in my frontend Next Js, and i have a separated express js server that has some endpoints that should be protected only for authorized users.
So my question is, after authenticated on next js (using a custom provider I made), how can i laverage it for express js know that I'm authenticated?
I was thinking to deliver via cookie the encrypted session to the express js so the express js can decrypt it and get the user from it.
The thing is, I'm not sure if it's possible to send it with cookie to another server because it sits on different domain and by default cookies are only saved for a specific origin no? and also, are there other methods i can use?
Beta Was this translation helpful? Give feedback.
All reactions