-
Notifications
You must be signed in to change notification settings - Fork 441
[ANDROID-BUG] Getting firebase token? #153
Comments
You can access it using data.refreshToken.
|
@xerotolerant That is exactly what i need, but:
Versions:
|
Okey, this is a bit weird. But the property refreshToken is there only in IOS. Not android. There is this method in user.
but when called:
|
@EddyVerbruggen Maybe you have ideas? |
What happens if you stringify the user object? can you see the token under another name or something? |
@xerotolerant The getToken() methid is inside the getCurrentUser method inside the plugin. I will try console stringify it. |
In this context. but whats weird:
Comments the token out, this is a method called, when a login has been successful. |
I'll take a look.. |
I think it's best to add a new method (something like) Sounds good? |
The problem was The GitHub version now has a new firebase.getAuthToken({
forceRefresh: false
}).then(
function (token) {
console.log("Auth token retrieved: " + token);
},
function (errorMessage) {
console.log("Auth token retrieval error: " + errorMessage);
}
); Please give it a spin and I'll soon publish to npm as well. |
Available in 3.6.4. |
Still doesn't work on android. |
Tryed removing the plugin and install again. Delete the platform folder. and reinstall the app. Still the same error. When i open node_modules/firebase.d.ts i can see the getAuthMethod() |
the firebase.android.js file doesnt contain the getAuthToken method |
I am calling |
All ok now? |
Looks like it :) On Wed, Oct 12, 2016 at 4:37 PM, Eddy Verbruggen [email protected]
|
I'm using the Facebook login on an Android emulator. When I call firebase.getAuthToken() it always returns the uid as the token instead of a JWT. Is that how it's supposed to work? How can I get a JWT to authenticate the user in my own web services? |
How can i get the auth token from:
I need the token, so i can send it to my backend and upload resized photos to firebase. Is there a better way to do this?
The text was updated successfully, but these errors were encountered: