Skip to content

Commit 90ddf96

Browse files
committed
Merge PR #883 into 17.0
Signed-off-by sbidoul
2 parents 3bc493a + ccd010c commit 90ddf96

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

auth_oauth_autologin/static/src/js/web_login.esm.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ publicWidget.registry.login.include({
1212
start: async function () {
1313
const def = this._super.apply(this, arguments);
1414
let url = window.location.href;
15-
if (url.includes("/web/login")) {
15+
const parsed_url = new URL(url);
16+
if (parsed_url.pathname === "/web/login") {
1617
url = url.replace("/web/login", "/web");
17-
}
18-
this._result = await this._rpc("/auth/auto_login_redirect_link", {
19-
redirect: url,
20-
});
21-
if (this._result) {
22-
window.location = this._result;
18+
this._result = await this._rpc("/auth/auto_login_redirect_link", {
19+
redirect: url,
20+
});
21+
if (this._result) {
22+
window.location = this._result;
23+
}
2324
}
2425
return def;
2526
},

0 commit comments

Comments
 (0)