Web: Added desktop parameter from url for oAuth login
This commit is contained in:
parent
af31f2fb9b
commit
678fa4c119
14
public/thirdparty/third-party.html
vendored
14
public/thirdparty/third-party.html
vendored
@ -52,10 +52,12 @@
|
||||
const searchUrl = location.search.substring(1);
|
||||
const object = JSON.parse(
|
||||
'{"' +
|
||||
decodeURIComponent(searchUrl
|
||||
.replace(/"/g, '\\"')
|
||||
.replace(/&/g, '","')
|
||||
.replace(/=/g, '":"')) +
|
||||
decodeURIComponent(
|
||||
searchUrl
|
||||
.replace(/"/g, '\\"')
|
||||
.replace(/&/g, '","')
|
||||
.replace(/=/g, '":"')
|
||||
) +
|
||||
'"}'
|
||||
);
|
||||
|
||||
@ -70,6 +72,7 @@
|
||||
const urlParams = getObjectByLocation(window.location);
|
||||
const code = urlParams ? urlParams.code || null : null;
|
||||
const error = urlParams ? urlParams.error || null : null;
|
||||
const desktop = urlParams ? urlParams.desktop || false : false;
|
||||
</script>
|
||||
</head>
|
||||
<body id="third-party-body">
|
||||
@ -78,6 +81,9 @@
|
||||
<script>
|
||||
if (code) {
|
||||
localStorage.setItem("code", code);
|
||||
if (desktop) {
|
||||
window.location = `/login.ashx?code=${code}&desktop=true`;
|
||||
}
|
||||
} else if (error) {
|
||||
renderError(error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user