Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get access token Google #218

Open
tbcy opened this issue May 31, 2022 · 0 comments
Open

Get access token Google #218

tbcy opened this issue May 31, 2022 · 0 comments

Comments

@tbcy
Copy link

tbcy commented May 31, 2022

Hello,

I'm trying to retrieve the access token when I connect to Google, but I can't.
There is an access token available, but it is not the one that allows to retrieve the user from the back office.
Indeed, I use Socialite (Laravel) to retrieve the user from the back office and I create an account if it does not exist.

Here is the code i use in front.

cfaSignInGoogle().subscribe( async result => { console.log(result); const copy = JSON.stringify(result.result.idToken); const body = { accessToken: copy } let res = await this.authService._firebase_authorize(body); let json = await res.json(); if (res.ok) { this.jwtService.set_token_storage(json.data.access_token); this.storageService.set('user', JSON.stringify(json.data.user)); this.go_to_welcome_page(); } else { // this.present_alert(); this.store.dispatch(hide()); } }, (error) => { alert('Une erreur est survenue lors de la connexion avec Google. Veuillez réessayer plus tard.'); });

I can see the good access token in the calls made to google api.
And the good access token is this one :

Capture_d’écran_2022-05-31_à_10_15_35

Is there a way to get this token ?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant