angularx-social-login - GetAccessToken prompting sign in pop up again

28 Views Asked by At

I have integrated Google sing in using angularx-social-login in angular 16 app, able to get the userInfo using

this.authService.authState.subscribe((user) => { this.user = user; this.loggedIn = (user != null); });

but I need accessToken to pass to resource server and login pop up is prompting again if i try to retrieve access token using

getAccessToken(): void { this.authService.getAccessToken(GoogleLoginProvider.PROVIDER_ID).then(accessToken => this.accessToken = accessToken); }

Is there a way i can retrieve accessToken without 2 prompts for UserInfo and access token

0

There are 0 best solutions below