capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.
https://capawesome.io/plugins/firebase/
Apache License 2.0
374 stars 97 forks source link

feat: keep existing users signed in when moving to native SDK #714

Open DontGiveAFck opened 1 week ago

DontGiveAFck commented 1 week ago

Plugin(s)

Current problem

Users that were signed in with js sdk in old app version should be kept signed in in new app version that uses native sdk.

Preferred solution

Not sure what exactly should be implemented, maybe signInWithCredential method should help - so we can get token id with js sdk and use it to login with newly implemented signInWithCredential in native sdk

Alternative options

No response

Additional context

No response

Before submitting

robingenz commented 1 week ago

I'm not sure if this is possible. It is definitely not possible with all OAuth providers. Even for users who are logged in with email/password, I can't think of a possibility right now. You often need information such as the access token or a secret that is only available at the time of login. Feel free to create a PR and i will take a look.