diff --git a/app/Http/Controllers/SocialiteController.php b/app/Http/Controllers/SocialiteController.php index a83a4948..8b36a413 100644 --- a/app/Http/Controllers/SocialiteController.php +++ b/app/Http/Controllers/SocialiteController.php @@ -32,7 +32,7 @@ public function callback(string $provider) } $user->update([ - 'name' => $authUser->getNickname(), + 'name' => $authUser->getNickname() ?? $authUser->getEmail(), 'sso_id' => $authUser->id, 'sso_provider' => $provider, 'sso_token' => $authUser->token ?? null, @@ -46,7 +46,7 @@ public function callback(string $provider) 'sso_id' => $authUser->getId(), 'sso_provider' => $provider, ], [ - 'name' => $authUser->getNickname(), + 'name' => $authUser->getNickname() ?? $authUser->getEmail(), 'email' => $authUser->getEmail(), 'sso_id' => $authUser->getId(), 'sso_provider' => $provider, diff --git a/config/services.php b/config/services.php index 6f4d8dde..e6dd508b 100644 --- a/config/services.php +++ b/config/services.php @@ -80,7 +80,7 @@ 'enabled' => env('SSO_GOOGLE_ENABLED', false), 'client_id' => env('SSO_GOOGLE_CLIENT_ID'), 'client_secret' => env('SSO_GOOGLE_CLIENT_SECRET'), - 'redirect' => '/auth/sso/{provider}/callback', + 'redirect' => '/auth/sso/google/callback', ], 'github' => [