Replies: 4 comments
-
@balazsorban44 , Could you please help me with this issue? Thanks a lot in advance. |
Beta Was this translation helpful? Give feedback.
-
Can anyone please help me with this? |
Beta Was this translation helpful? Give feedback.
-
Maybe https://next-auth.js.org/configuration/options#nextauth_url_internal |
Beta Was this translation helpful? Give feedback.
-
Your problem may be the same as mine but under a different approach. Your CDN may be caching incorrectly. I am not an Azure user, but see if there is a way to disable caching even if just temporarily to test this theory. If disabling caching resolves the issue, then look for a way to customize the config of this caching layer. Your CDN probably is not smart enough by default to know what data/pages from the underlying reverse proxy should be cached and is caching too much. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
I am using the next-auth library for authentication in my application. I am using fusionauth authentication using next-auth.
Everything is working fine while development and application was running over localhost:3000. Also, I have deployed my app in azure web app with a domain like abc.com and everything was working completely fine.
Now, In my case, I would need to serve my application over test.com. What we are doing is traverse requests from test.com --> abc.com. This has been set up using azure CDN(Also, I tried other approaches as well).
In this case, my login stopped working which was working fine in the first 2 scenarios. When I was debugging this issue, I came to know that It is failing at csrf token part. The token which is set in httponly cookie and token which is passed in API call of fusionauth login, both are different so next-auth is not validating this request and NOT redirecting user at login. On another note, this csrf token has been managed by next-auth itself. I am not using anything from end here! I just put loges in library itself and came to know these things!
Could you please look at this and provide your feedback for the same? Also please let me know If anything else is required from my end to debug this issue!
Thanks a lot in advance!!
How to reproduce ☕️
I will be adding a sample code repo URL soon.
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
Beta Was this translation helpful? Give feedback.
All reactions