Skip to content

Commit

Permalink
Add Google sign in button #43
Browse files Browse the repository at this point in the history
  • Loading branch information
CMenne committed Jun 21, 2018
1 parent fafb0d0 commit b913587
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<app-nav></app-nav>
<router-outlet></router-outlet>
<router-outlet></router-outlet>
<app-login></app-login>
2 changes: 2 additions & 0 deletions client/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {NavComponent} from "./nav/nav.component";
import {Routing} from './app.routes';
import {APP_BASE_HREF} from '@angular/common';
import {CustomModule} from './custom.module';
import { LoginComponent } from './login/login.component';


@NgModule({
Expand All @@ -32,6 +33,7 @@ import {CustomModule} from './custom.module';
SubmissionListComponent,
NewSubmissionComponent,
NavComponent,
LoginComponent,
],
providers: [
{provide: APP_BASE_HREF, useValue: '/'},
Expand Down
9 changes: 9 additions & 0 deletions client/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<script>
function onSignIn(googleUser) {
var profile = googleUser.getBasicProfile();
console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
console.log('Name: ' + profile.getName());
console.log('Image URL: ' + profile.getImageUrl());
console.log('Email: ' + profile.getEmail()); // This is null if the 'email' scope is not present.
}
</script>
<app-root><svg class="spinner" width="65px" height="65px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
<circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle>
</svg></app-root>
Expand Down

0 comments on commit b913587

Please sign in to comment.