firebaseui-web icon indicating copy to clipboard operation
firebaseui-web copied to clipboard

firebaseui doesn't work with sessionStorage when localStorage unavailable

Open skouny opened this issue 1 year ago • 2 comments
trafficstars

  • Operating System version: Android 14.0.0
  • Browser version: Android WebView 122.0
  • Firebase UI version: 6.1
  • Firebase SDK version: 10.8

When localStorage unavailable doesn't work with sessionStorage

setPersistence was set to browserSessionPersistence before FirebaseUI init

Screenshot_20240318_101319_WebPrintSDK

skouny avatar Mar 18 '24 08:03 skouny

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.

jhuleatt avatar Mar 18 '24 19:03 jhuleatt