Skip to content

Commit 8db3fe8

Browse files
authored
🐛 fix error handling on registration via mastodon (#3169)
1 parent edb6955 commit 8db3fe8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/Http/Controllers/Frontend/Social/MastodonController.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ public function callback(): RedirectResponse {
6969
config(['services.mastodon.client_id' => $server->client_id]);
7070
config(['services.mastodon.client_secret' => $server->client_secret]);
7171

72+
if (request()->has('error')) {
73+
return redirect()->route('login')->with('error', \request('error_description'));
74+
}
75+
7276
$socialiteUser = Socialite::driver(driver: 'mastodon')->user();
7377
$user = MastodonBackend::getUserFromSocialite($socialiteUser, $server);
7478
if (!auth()->check()) {

0 commit comments

Comments
 (0)