public function GarminRedirect(): RedirectResponse
{
/** @phpstan-ignore-next-line */
return Socialite::driver(ProviderType::GARMIN->value)
->redirect();
}
public function GarminCallback(): RedirectResponse
{
dd('It doesn't come here');
try {
/** @phpstan-ignore-next-line */
$userProvider = Socialite::driver(ProviderType::GARMIN->value)->stateless()->user();
dd($userProvider);
} catch (Exception $e) {
return redirect('/')->with('toastr::warning', $e->getMessage());
}
}
I don't know why it's not working.
I have everything set up for Strava too, and it works fine.
After the redirect coming from Garmin authorization, it returns to the home (localhost) with the following url
http://localhost/?oauth_token=*****&oauth_verifier=****
But the callback doesn't work.
https://socialiteproviders.com/GarminConnect/
I'm trying to implement Garmin Connect in my application, but the callback doesn't happen at all.
In the service config I have:
In .env:
GARMINCONNECT_REDIRECT_URI=http://localhost/garmin-callback
Routes:
And in controller:
I don't know why it's not working. I have everything set up for Strava too, and it works fine.
After the redirect coming from Garmin authorization, it returns to the home (localhost) with the following url
http://localhost/?oauth_token=*****&oauth_verifier=****
But the callback doesn't work.