Category: refresh-token

Can’t get User getter in AuthenticationSuccessEvent

I tried to save User gsm data after Authentication Success Event : /** * @param AuthenticationSuccessEvent $event */ public function onAuthenticationSuccessResponse(AuthenticationSuccessEvent $event) { $data = $event->getData(); $user = $event->getUser(); dd($user); $gsm = isset(json_decode($this->requestStack->getCurrentRequest()->getContent())->gsm) ? json_decode($this->requestStack->getCurrentRequest()->getContent())->gsm : null; if ($user->getGsm()) {…

How to get Google refresh token with knpuniversity/oauth2-client-bundle?

I use knpuniversity/oauth2-client-bundle and league/oauth2-google to connect users in my Symfony 4 web app using a “Sign in with Google” feature. I followed this tuto. I registered my app in Google. I set access_type: offline in the knpu.oauth2.client.google configuration (config/packages/knpu_oauth2_client.yaml…