Sharing authentication with Iframe hosted on third party website. How?

maricix

MariH

Posted on February 7, 2024

Sharing authentication with Iframe hosted on third party website. How?

Hello everyone, I have following problem. I need to share an authentication status with an iframe hosted on a third-party website (so cross-domain). The iframe is embedding my site, which is protected by a login. I am currently managing authentication via express-session, so when a user logs in a value (f.e. req.sessions.loggedIn) is set to true. However, this is not shared with the iframe ofc, so the user would have to login every time he uses the iframe. What would be the best way to manage this? How can I share an "auth-status" with the other domain in a secure way?

💖 💪 🙅 🚩
maricix
MariH

Posted on February 7, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related