如何跨域共享Firebase简单登录会话? [英] How do I share Firebase Simple Login sessions across domains?
本文介绍了如何跨域共享Firebase简单登录会话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I have example.com and app.example.com. How can I log someone in from one domain and share that session with the other?
解决方案
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?.
这篇关于如何跨域共享Firebase简单登录会话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文