Ссылка Firebase Auth and Google Calendar, как это сделать с помощью полимерных элементов?Firebase Auth и Google Calendar с использованием Polymer
На моей странице, я добавил Google-вход в аккаунт элемент
<google-signin
client-id="xxxx.apps.googleusercontent.com">
</google-signin>
Затем я стал ждать, google-signin-success
события будет уволен и получил маркер доступа с
gapi.auth2.getAuthInstance().currentUser.get().hg.access_token)
Как войти с firebase-аутентификации? Я попытался добавить firebase-AUTH элемент, как это в моей странице
<firebase-auth id="authenticate"
user="{{user}}"
location="{{location}}"
ref="{{refauth}}"
provider="google">
</firebase-auth>
и назвал его программно, как так
signIn: function() {
var params = {token: "ya29.xxxxx"};
this.$.authenticate.login(params);
},
signOut: function() {
this.$.authenticate.logout();
this.user = null;
}
});
однако, firebase-Auth все равно выскочит Google для входа в аккаунт диалога. Как я могу войти в токен доступа?
Вы также можете посмотреть здесь: https://github.com/MeTaNoV/firebase-element-extended –
Скорее всего, элемент firebase не поддерживает [аутентификацию с помощью стороннего маркера oauth] (https://www.firebase.com/docs/web/api/firebase/authwithoauthtoken.html), но просто вызывает authWithOAuthPopup(). Звучит как запрос функции. – Kato
@PascalGula Я быстро просмотрел github.com/MeTaNoV/firebase-element-extended, но не вижу, как я могу войти с токеном OAuth. – user3240644