Remover procesos en service Google

This commit is contained in:
Paola 2021-07-06 20:49:15 -06:00
parent b35d77f637
commit ccc7784489
1 changed files with 1 additions and 24 deletions

View File

@ -5,28 +5,5 @@ import { Observable, ReplaySubject } from 'rxjs';
providedIn: 'root', providedIn: 'root',
}) })
export class UsuarioGoogleLogInService { export class UsuarioGoogleLogInService {
constructor(private auth2: gapi.auth2.GoogleAuth, private subject: ReplaySubject<gapi.auth2.GoogleUser>) { constructor() {}
gapi.load('auth2', () => {
this.auth2 = gapi.auth2.init({
client_id: '178178891217-b517thad8f15d4at2vk2410v7a09dcvt.apps.googleusercontent.com',
});
});
}
public sigIn() {
this.auth2
.signIn({
//
})
.then(user => {
this.subject.next(user);
})
.catch(() => {
this.subject.next(); //NULL
});
}
public observable(): Observable<gapi.auth2.GoogleUser> {
return this.subject.asObservable();
}
} }