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
I.e. so that the same user could log in with different IP and device/browsers. I know that I can access the request from the authorize callback of Credentials provider, but I want to do it for all providers (Google, Twitter, etc.).
However, in the new next-auth v5 NextAuth can be initialized and exported only outside the GET, POST handlers (I can't pass the headers into NextAuth):
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
-
Is it possible to access request headers in the jwt callback? I used to be able to in v4 the following way (route.ts):
auth.ts:
I.e. so that the same user could log in with different IP and device/browsers. I know that I can access the request from the authorize callback of Credentials provider, but I want to do it for all providers (Google, Twitter, etc.).
However, in the new next-auth v5 NextAuth can be initialized and exported only outside the GET, POST handlers (I can't pass the headers into NextAuth):
Thanks, and sorry if this is a newbie question.
Beta Was this translation helpful? Give feedback.
All reactions