New fallback OAuth template
This commit is contained in:
parent
8af011f638
commit
3dcba7cc3f
|
@ -109,12 +109,12 @@ $utopia->get('/auth/recovery/reset')
|
|||
});
|
||||
|
||||
|
||||
$utopia->get('/auth/success')
|
||||
$utopia->get('/auth/oauth2/success')
|
||||
->desc('Registration page')
|
||||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../../views/home/auth/success.phtml');
|
||||
$page = new View(__DIR__.'/../../views/home/auth/oauth2.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME)
|
||||
|
@ -124,12 +124,12 @@ $utopia->get('/auth/success')
|
|||
;
|
||||
});
|
||||
|
||||
$utopia->get('/auth/failure')
|
||||
$utopia->get('/auth/oauth2/failure')
|
||||
->desc('Registration page')
|
||||
->label('permission', 'public')
|
||||
->label('scope', 'home')
|
||||
->action(function () use ($layout) {
|
||||
$page = new View(__DIR__.'/../../views/home/auth/failure.phtml');
|
||||
$page = new View(__DIR__.'/../../views/home/auth/oauth2.phtml');
|
||||
|
||||
$layout
|
||||
->setParam('title', APP_NAME)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<script>window.location = 'appwrite-callback://'+window.document.cookie;</script>
|
13
app/views/home/auth/oauth2.phtml
Normal file
13
app/views/home/auth/oauth2.phtml
Normal file
|
@ -0,0 +1,13 @@
|
|||
<div class="zone large padding margin-top" id="message" style="display: none">
|
||||
<h1 class="margin-bottom">Missing Redirect URL</h1>
|
||||
<p>Your OAuth login flow is missing a redirect URL. Please check the <a href="https://<?php echo APP_DOMAIN; ?>/docs/account?platform=web&language=javascript#createOAuth2Session">OAuth docs</a> and send request for new session with a valid callback URL.</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
setTimeout(function () {
|
||||
document.getElementById('message').style.display = 'block';
|
||||
}, 25);
|
||||
|
||||
window.location = 'appwrite-callback://'+window.location.search;
|
||||
</script>
|
||||
<hr />
|
|
@ -1 +0,0 @@
|
|||
<script>window.location = 'appwrite-callback://'+window.document.cookie;</script>
|
Loading…
Reference in a new issue