firebase-js-sdk icon indicating copy to clipboard operation
firebase-js-sdk copied to clipboard

`signInWithCustomToken` not working on Safari

Open KrisLau opened this issue 1 year ago • 0 comments

Operating System

iOS 16.4

Browser Version

16.5

Firebase SDK Version

10.7.1

Firebase SDK Product:

Auth

Describe your project's tooling

React with Vite

Describe the problem

So I'm trying to implement an auto login for my website when the user is logged in on the app and viewing it in the webview on the app. Currently, I'm passing my userID to my website that's displayed in my React Native app's webview via query parameters. Then in the useEffect for the website, I retrieve the custom token from my backend and signInWithCustomToken from firebase. For some reason, the auto login works on Android but not on iOS. I think it's a Safari issue:

  • https://www.reddit.com/r/Firebase/comments/13r8kkq/firebase_auth_signinwithcustomtoken_not_working/
  • https://stackoverflow.com/questions/71446206/firebase-auth-signinwithcustomtoken-on-safari-web-extension-not-working

Steps and code to reproduce issue

Try to signInWithCustomToken on Chrome and Safari. On Chrome, it will work but on Safari, it will fail with no error.

KrisLau avatar Jan 31 '24 11:01 KrisLau