polymerfire
polymerfire copied to clipboard
[firebase-auth] Ability to set custom parameters into auth providers
Hi,
I need to set a custom parameter in the GoogleAuthProvider. Something like this:
var provider = new firebase.auth.GoogleAuthProvider();
provider.setCustomParameters({
prompt: 'select_account'
});
Which extension point could be implemented to support this ? A new attribute ?
@fabito right now I am not aware of having a helper for that in firebase-auth but what you can do is this:
<firebase-auth id="auth" user="{{user}}"></firebase-auth>
// on scripts part
var auth = this.shadowRoot.querySelector('#auth')
var provider = new firebase.auth.GoogleAuthProvider();
provider.setCustomParameters({
prompt: 'select_account'
});
auth.signInWithPopup(provider).then(result => {
console.log(result.user)
})