Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions auth_oauth_autologin/static/src/js/web_login.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ publicWidget.registry.login.include({
start: async function () {
const def = this._super.apply(this, arguments);
let url = window.location.href;
if (url.includes("/web/login")) {
const parsed_url = new URL(url);
if (parsed_url.pathname === "/web/login") {
url = url.replace("/web/login", "/web");
}
this._result = await this._rpc("/auth/auto_login_redirect_link", {
redirect: url,
});
if (this._result) {
window.location = this._result;
this._result = await this._rpc("/auth/auto_login_redirect_link", {
redirect: url,
});
if (this._result) {
window.location = this._result;
}
}
return def;
},
Expand Down