We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3bc493a + ccd010c commit 90ddf96Copy full SHA for 90ddf96
1 file changed
auth_oauth_autologin/static/src/js/web_login.esm.js
@@ -12,14 +12,15 @@ publicWidget.registry.login.include({
12
start: async function () {
13
const def = this._super.apply(this, arguments);
14
let url = window.location.href;
15
- if (url.includes("/web/login")) {
+ const parsed_url = new URL(url);
16
+ if (parsed_url.pathname === "/web/login") {
17
url = url.replace("/web/login", "/web");
- }
18
- this._result = await this._rpc("/auth/auto_login_redirect_link", {
19
- redirect: url,
20
- });
21
- if (this._result) {
22
- window.location = this._result;
+ this._result = await this._rpc("/auth/auto_login_redirect_link", {
+ redirect: url,
+ });
+ if (this._result) {
+ window.location = this._result;
23
+ }
24
}
25
return def;
26
},
0 commit comments