You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a hybrid Ionic (Capacitor+Cordova) iOS & Android App.
To authenticate the users i uses Firebase Authentication and this cordova plugin. This works really fine (thank you) and there are no problems.
In addition to that, I have one native share extension per platform. Firebase Authentication is also required there to authenticate against my backend.
For Android share extension i can use the Firebase framework directly and can just follow the documentation.
For iOS i can share the idToken from my main app into the extension. This works also fine, but then i can't refresh the idToken if the token is expired. (There are some issues to integrate firebase into a ios extension).
Solution
As a solution i can use the Firebase Authentication REST API: Exchange a refresh token for an ID token. For that i need the refresh_token, but this property is missing in the current implementation. According to the documentation there is this attribute directly in FIRUser. FIRUser#refreshtoken
@chemerisuk I'm not entirely sure, but the following changes should be sufficient, right?
Hey @chemerisuk thank you for your answer and your note. 👍
I will check what the equivalent is on Android. getRefreshToken() does not exist there, unfortunately.
Situation/Problem
I have a hybrid Ionic (Capacitor+Cordova) iOS & Android App.
To authenticate the users i uses Firebase Authentication and this cordova plugin. This works really fine (thank you) and there are no problems.
In addition to that, I have one native share extension per platform. Firebase Authentication is also required there to authenticate against my backend.
For Android share extension i can use the Firebase framework directly and can just follow the documentation.
For iOS i can share the idToken from my main app into the extension. This works also fine, but then i can't refresh the idToken if the token is expired. (There are some issues to integrate firebase into a ios extension).
Solution
As a solution i can use the Firebase Authentication REST API: Exchange a refresh token for an ID token. For that i need the refresh_token, but this property is missing in the current implementation. According to the documentation there is this attribute directly in FIRUser. FIRUser#refreshtoken
@chemerisuk I'm not entirely sure, but the following changes should be sufficient, right?
FirebaseAuthenticationPlugin.m
The text was updated successfully, but these errors were encountered: