Skip to content
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

Migrate JavaScript libraries from the earlier Google Sign-In platform… #808

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions auth/google-credentials.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<link rel="stylesheet" href="main.css">

<!-- Google Sign In -->
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script src="https://accounts.google.com/gsi/client" async defer></script>

<!-- Import and configure the Firebase SDK -->
<!-- These scripts are made available when the app is served or deployed on Firebase Hosting -->
Expand All @@ -66,7 +66,7 @@
if (!isUserEqual(googleUser, firebaseUser)) {
// Build Firebase credential with the Google ID token.
var credential = firebase.auth.GoogleAuthProvider.credential(
googleUser.getAuthResponse().id_token);
googleUser.credential);

// Sign in with credential from the Google user.
firebase.auth().signInWithCredential(credential).catch(function(error) {
Expand Down Expand Up @@ -178,7 +178,12 @@ <h2 class="mdl-card__title-text">Google Authentication with OAuth Credentials</h
<div class="mdl-card__supporting-text mdl-color-text--grey-600">
<p>Sign in with your Google account below.</p>
<!-- [START google_button] -->
<div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div>
<!-- <div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div> -->
<div id="g_id_onload"
data-client_id="YOUR_CLIENT_ID"
data-callback="onSignIn">
</div>
<div class="g_id_signin" data-type="standard"></div>
<!-- [END google_button] -->
<br>
<button disabled class="mdl-button mdl-js-button mdl-button--raised" id="signout" name="signout">Sign Out</button>
Expand Down