Added default OAuth callbacks
This commit is contained in:
parent
0a0c76277b
commit
9d6d6b24cc
|
@ -108,6 +108,37 @@ $utopia->get('/auth/recovery/reset')
|
|||
->setParam('body', $page);
|
||||
});
|
||||
|
||||
|
||||
$utopia->get('/auth/success')
|
||||
->desc('Registration page')
|
||||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../../views/home/auth/success.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME)
|
||||
->setParam('body', $page)
|
||||
->setParam('header', [])
|
||||
->setParam('footer', [])
|
||||
;
|
||||
});
|
||||
|
||||
$utopia->get('/auth/failure')
|
||||
->desc('Registration page')
|
||||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../../views/home/auth/failure.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME)
|
||||
->setParam('body', $page)
|
||||
->setParam('header', [])
|
||||
->setParam('footer', [])
|
||||
;
|
||||
});
|
||||
|
||||
$utopia->get('/error/:code')
|
||||
->desc('Error page')
|
||||
->label('permission', 'public')
|
||||
|
|
1
app/views/home/auth/failure.phtml
Normal file
1
app/views/home/auth/failure.phtml
Normal file
|
@ -0,0 +1 @@
|
|||
<script>window.location = 'appwrite-callback://'+window.document.cookie;</script>
|
1
app/views/home/auth/success.phtml
Normal file
1
app/views/home/auth/success.phtml
Normal file
|
@ -0,0 +1 @@
|
|||
<script>window.location = 'appwrite-callback://'+window.document.cookie;</script>
|
Loading…
Reference in a new issue