1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00

Merge pull request #7695 from appwrite/fix-encode-secret-in-oauth-workaround

fix: encode secret in oauth workaround
This commit is contained in:
Christy Jacob 2024-02-29 20:17:31 +05:30 committed by GitHub
commit cc2e4087a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -934,12 +934,12 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
->setPayload($response->output($session, Response::MODEL_SESSION))
;
// TODO: Remove this deprecated, undocumented workaround
// TODO: Remove this deprecated workaround - support only token
if ($state['success']['path'] == $oauthDefaultSuccess) {
$query['project'] = $project->getId();
$query['domain'] = Config::getParam('cookieDomain');
$query['key'] = Auth::$cookieName;
$query['secret'] = $secret;
$query['secret'] = Auth::encodeSession($user->getId(), $secret);
}
$response