How do I share Firebase Simple Login sessions across domains?

走远了吗. 提交于 2020-01-23 08:04:33

问题


I have example.com and app.example.com. How can I log someone in from one domain and share that session with the other?


回答1:


Firebase Simple Login sessions are persisted using LocalStorage or SessionStorage which are scoped to HTML5 origin, which is a tuple of scheme, host, and port, which is why it is not shared across subdomains by default.

That said, you can manually enable this in your application by creating a shared LocalStorage system, using methods like described here at Can HTML5 databases and localStorage be shared across subdomains?.



来源:https://stackoverflow.com/questions/24333569/how-do-i-share-firebase-simple-login-sessions-across-domains

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!