mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Added default OAuth handler a unique scheme
This commit is contained in:
@@ -483,6 +483,7 @@ $utopia->get('/v1/account/sessions/oauth2/:provider/redirect')
|
||||
if($state['success'] === $oauthDefaultSuccess) { // Add keys for non-web platforms
|
||||
$state['success'] = URLParser::parse($state['success']);
|
||||
$query = URLParser::parseQuery($state['success']['query']);
|
||||
$query['project'] = $project->getId();
|
||||
$query['domain'] = COOKIE_DOMAIN;
|
||||
$query['key'] = Auth::$cookieName;
|
||||
$query['secret'] = Auth::encodeSession($user->getId(), $secret);
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
document.getElementById('message').style.display = 'block';
|
||||
}, 25);
|
||||
|
||||
window.location = 'appwrite-callback://'+window.location.search;
|
||||
const query = new URLSearchParams(window.location.search);
|
||||
const project = query.get('project');
|
||||
|
||||
window.location = 'appwrite-callback-'+project+'://'+window.location.search;
|
||||
</script>
|
||||
<hr />
|
||||
Reference in New Issue
Block a user