Hello, after calling the methodgetAccessToken(PROVIDER_ID), GSI throws a warning - [GSI_LOGGER-TOKEN_CLIENT]: Set token failed. Gapi.client.setToken undefined. Here is my code snippet:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Version: 1.2.1 Provider: Google
Hello, after calling the method
getAccessToken(PROVIDER_ID)
, GSI throws a warning - [GSI_LOGGER-TOKEN_CLIENT]: Set token failed. Gapi.client.setToken undefined. Here is my code snippet:app.module.ts
providers: [ { provide: 'SocialAuthServiceConfig', useValue: { autoLogin: true, providers: [ { id: GoogleLoginProvider.PROVIDER_ID, provider: new GoogleLoginProvider(environment.googleOAuthClientID, googleLoginOptions) }, ], } as SocialAuthServiceConfig, },
auth-service.ts
public registerAuthService() { this.socialAuthService.authState.subscribe(user => { this.socialAuthService.getAccessToken(GoogleLoginProvider.PROVIDER_ID).then(token => { if (token) { user.authToken = token; this.socialUser.next(user); } }); }); }
Any idea what is going on?