-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #35: Add <firebase-auth> support for custom token auth #41
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
It is a corp CLA under the name Momentum Ideas Co. |
return Promise.reject('No app configured for firebase-auth!'); | ||
} | ||
return this._handleSignIn(this.auth.signInWithCustomToken(token)); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woop,
there it is
Thanks man ! This is a must feature. Wondering why it wasn't included in the release. |
Just fund this after I spent some time to create this on my own, this should be merged asap. |
Great! Thanks for the PR. |
@mbleigh @sgammon Thanks for merging it. I cannot figure out how to use it. I'm getting the following error: Please provide a simple example. This is what I'm currently using: |
well you will probably need a better key than but I digress, Firebase's custom token format has changed. so if you are generating tokens in the old 2.x format (we were), you will have to switch over to their new token generator library. see here for code samples in Java and Node.JS: basically they changed the token format so that all the developer-provided claims are listed in a |
Oh didn't know that. I was actually using the old tokens. Generating them with the old PHP SDK for the server. |
This changeset adds a simple function to support
signInWithCustomToken
in the<firebase-auth>
component.