Backend authentication
This commit is contained in:
@@ -43,7 +43,6 @@ export class LoginPageComponent implements OnInit {
|
||||
|
||||
async handleCredentialResponse(response: any) {
|
||||
try {
|
||||
console.log("Google Response", response);
|
||||
const responsePayload: any = jwt_decode(response.credential);
|
||||
this.data$.currentUser = new User({
|
||||
googleCredentials: response.credential,
|
||||
@@ -51,10 +50,8 @@ export class LoginPageComponent implements OnInit {
|
||||
email: responsePayload.email,
|
||||
avatar: responsePayload.picture
|
||||
});
|
||||
// this.auth$.loadDbUser();
|
||||
console.log("USer", this.data$.currentUser);
|
||||
await this.auth$.getAPIToken(response.credential);
|
||||
// this.auth$.loadDbUser();
|
||||
this.auth$.ping();
|
||||
this.ngZone$.run(() => {
|
||||
this.router$.navigate(['/app']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user