mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: auth user
This commit is contained in:
1 parent
55360c3af0
commit
0517ebfb4e
2 files changed
+3
-24
No files matched your search
@@ -1346,16 +1346,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
|
||||
);
|
||||
}
|
||||
|
||||
$oauth2ID = '';
|
||||
try {
|
||||
$oauth2ID = $oauth2->getUserID($accessToken);
|
||||
} catch (Exception $ex) {
|
||||
$failureRedirect(
|
||||
$ex->getType(),
|
||||
'Failed to obtain user ID. The ' . $providerName . ' OAuth2 provider returned an error: ' . $ex->getMessage(),
|
||||
);
|
||||
}
|
||||
|
||||
$oauth2ID = $oauth2->getUserID($accessToken);
|
||||
if (empty($oauth2ID)) {
|
||||
$failureRedirect(Exception::USER_MISSING_ID);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user