firebase / firebaseui-web

FirebaseUI is an open-source JavaScript library for Web that provides simple, customizable UI bindings on top of Firebase SDKs to eliminate boilerplate code and promote best practices.
https://firebase.google.com/
Apache License 2.0
4.59k stars 1.06k forks source link

firebaseui doesn't work with sessionStorage when localStorage unavailable #1077

Open skouny opened 7 months ago

skouny commented 7 months ago

When localStorage unavailable doesn't work with sessionStorage

setPersistence was set to browserSessionPersistence before FirebaseUI init

Screenshot_20240318_101319_WebPrintSDK

jhuleatt commented 7 months ago

Hi @skouny, this is interesting. FirebaseUI checks for both sessionStorage and localStorage:

https://github.com/firebase/firebaseui-web/blob/5ff6fde2324d95d976e35ef1986ac5f241d3774e/javascript/utils/storage.js#L84-L87

However, it only seems to use sessionStorage and cookies, without any localStorage at all:

https://github.com/firebase/firebaseui-web/blob/5ff6fde2324d95d976e35ef1986ac5f241d3774e/javascript/utils/storage.js#L94-L119

Taking away the localStorage check seems like the right move to me. The codebase will need another look to confirm that localStorage really isn't used, though. I'll mark this as a bug.

nkumawat34 commented 1 month ago

Can I work on this issue..