Fix unwanted auth redirect after failed OAuth2 login
This commit is contained in:
parent
5c52320c83
commit
7cd9f975d5
5 changed files with 12 additions and 4 deletions
|
@ -595,7 +595,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add keys for non-web platforms - TODO - add verification phase to aviod session sniffing
|
// Add keys for non-web platforms - TODO - add verification phase to aviod session sniffing
|
||||||
if (parse_url($state['success'], PHP_URL_PATH) === $oauthDefaultSuccess) {
|
if (parse_url($state['success'], PHP_URL_PATH) === parse_url($oauthDefaultSuccess, PHP_URL_PATH)) {
|
||||||
$state['success'] = URLParser::parse($state['success']);
|
$state['success'] = URLParser::parse($state['success']);
|
||||||
$query = URLParser::parseQuery($state['success']['query']);
|
$query = URLParser::parseQuery($state['success']['query']);
|
||||||
$query['project'] = $project->getId();
|
$query['project'] = $project->getId();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="zone large padding margin-top" id="message" style="display: none">
|
<div class="zone large padding margin-top" id="message" style="display: none">
|
||||||
<h1 class="margin-bottom">Missing Redirect URL</h1>
|
<h1 class="margin-bottom">Missing Redirect URL</h1>
|
||||||
<p>Your OAuth login flow is missing a redirect URL. Please check the
|
<p>Your OAuth login flow is missing a proper redirect URL. Please check the
|
||||||
<a href="https://<?php echo APP_DOMAIN; ?>/docs/client/account?sdk=web#createOAuth2Session">OAuth docs</a>
|
<a href="https://<?php echo APP_DOMAIN; ?>/docs/client/account?sdk=web#createOAuth2Session">OAuth docs</a>
|
||||||
and send request for new session with a valid callback URL.</p>
|
and send request for new session with a valid callback URL.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
2
public/dist/scripts/app-all.js
vendored
2
public/dist/scripts/app-all.js
vendored
File diff suppressed because one or more lines are too long
2
public/dist/scripts/app.js
vendored
2
public/dist/scripts/app.js
vendored
File diff suppressed because one or more lines are too long
|
@ -23,6 +23,14 @@ window.ls.router
|
||||||
template: "/auth/join?version=" + APP_ENV.CACHEBUSTER,
|
template: "/auth/join?version=" + APP_ENV.CACHEBUSTER,
|
||||||
scope: "home"
|
scope: "home"
|
||||||
})
|
})
|
||||||
|
.add("/auth/oauth2/success", {
|
||||||
|
template: "/auth/oauth2/success?version=" + APP_ENV.CACHEBUSTER,
|
||||||
|
scope: "home"
|
||||||
|
})
|
||||||
|
.add("/auth/oauth2/failure", {
|
||||||
|
template: "/auth/oauth2/failure?version=" + APP_ENV.CACHEBUSTER,
|
||||||
|
scope: "home"
|
||||||
|
})
|
||||||
.add("/console", {
|
.add("/console", {
|
||||||
template: "/console?version=" + APP_ENV.CACHEBUSTER,
|
template: "/console?version=" + APP_ENV.CACHEBUSTER,
|
||||||
scope: "console"
|
scope: "console"
|
||||||
|
|
Loading…
Reference in a new issue