Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- signin(){
- var provider = new firebase.auth.GoogleAuthProvider();
- provider.addScope('https://www.googleapis.com/auth/plus.login');
- firebase.auth().signInWithPopup(provider).then(function(result) {
- // This gives you a Google Access Token. You can use it to access the Google API.
- var token = result.credential.accessToken;
- // The signed-in user info.
- var user = result.user;
- // ...
- }).catch(function(error) {
- // Handle Errors here.
- });
- }
- var user = firebase.auth().currentUser;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement