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
In Advanced initialization and authorize function in providers, the req object contains the x-forwarded-for header, which I can use to get the user's IP. I want to confirm if this header is set by NextAuth and whether it's trustworthy — ensuring users can't modify it.
And is it set by trusting other proxies? I don't trust any proxy in my app, so if yes, how can I get IP of sender?
Is it possible to determine trusted proxy addresses?
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
-
In
Advanced initialization
andauthorize
function in providers, thereq
object contains thex-forwarded-for
header, which I can use to get the user's IP. I want to confirm if this header is set by NextAuth and whether it's trustworthy — ensuring users can't modify it.And is it set by trusting other proxies? I don't trust any proxy in my app, so if yes, how can I get IP of sender?
Is it possible to determine trusted proxy addresses?
I noticed the docs don’t mention this explicitly.
Beta Was this translation helpful? Give feedback.
All reactions