Login loop in an iframe: the sign-in page loads again
You sign in inside the frame, and the sign-in page comes back. The login worked, but the browser does not send the session cookie to the framed site, so each request looks signed out.
- Chrome
- Edge
- Firefox
- Safari
Updated
The sign-in page loads again inside the frame after you sign in.
The sign-in page loads again. DevTools shows a blocked cookie in the Issues tab or on the Cookies tab of the request.
The sign-in page loads again. The console often has a line that starts with “Cookie” and says it was rejected.
The sign-in page loads again. Safari blocks the cookies of a site in a frame unless the site gets storage access.
On this page
What it means
Why it happens
Check the page
See the headers the page sends now
Fix it if you own the site
Set-Cookie: session=abc123; Path=/; Secure; HttpOnly; SameSite=None; Partitioned
A cookie with SameSite=None must also have Secure, and the page must use HTTPS. Without Secure, the browser rejects the cookie.
If you do not own the site
- Open the page in a new tab
Link to the page so the user signs in on the site itself, where its cookies work.
- Use the official embed
Some services give an embed that needs no login, or one that is made for frames.
- Ask the owner
Ask them to set their cookie with SameSite=None, Secure and Partitioned.