Added default OAuth handler a unique scheme
This commit is contained in:
parent
eeb19ff996
commit
11a3d3de58
2 changed files with 5 additions and 1 deletions
|
@ -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 />
|
Loading…
Reference in a new issue