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
Our application will be embedded in an iframe in another application, and the only way I have managed to get our oauth login to work is to use something similar to the solution here. This required me to change the cookies sameSite setting to none, whilst this works it is not ideal and got me thinking about other solutions.
Basically I sign in using a popup, but I am only signed in in the popup due to State Partitioning (or not in an iframe) but I now have an Access and Refresh token in a session, what if I use window.opener.postMessage in the popup and window.addEventListener('message', handleMessage); in the iframe to send my credentials back? This step was surprisingly easy!
Now I have my tokens but no idea how to get them into next-auth, does anyone have any ideas?
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
-
Our application will be embedded in an iframe in another application, and the only way I have managed to get our oauth login to work is to use something similar to the solution here. This required me to change the cookies
sameSite
setting tonone
, whilst this works it is not ideal and got me thinking about other solutions.Basically I sign in using a popup, but I am only signed in in the popup due to State Partitioning (or not in an iframe) but I now have an Access and Refresh token in a session, what if I use
window.opener.postMessage
in the popup andwindow.addEventListener('message', handleMessage);
in theiframe
to send my credentials back? This step was surprisingly easy!Now I have my tokens but no idea how to get them into
next-auth
, does anyone have any ideas?Beta Was this translation helpful? Give feedback.
All reactions