Merge pull request #2953 from QuantumEntangledAndy/feat/AdditionalLogins

Add additional login methods
This commit is contained in:
Cohee
2024-10-09 13:43:39 +03:00
committed by GitHub
6 changed files with 160 additions and 13 deletions

View File

@ -180,7 +180,13 @@ function displayError(message) {
* Preserves the query string.
*/
function redirectToHome() {
window.location.href = '/' + window.location.search;
// After a login theres no need to preserve the
// noauto (if present)
const urlParams = new URLSearchParams(window.location.search);
urlParams.delete('noauto');
window.location.href = '/' + urlParams.toString();
}
/**

View File

@ -848,7 +848,14 @@ async function logout() {
headers: getRequestHeaders(),
});
window.location.reload();
// On an explicit logout stop auto login
// to allow user to change username even
// when auto auth (such as authelia or basic)
// would be valid
const urlParams = new URLSearchParams(window.location.search);
urlParams.set('noauto', 'true');
window.location.search = urlParams.toString();
}
/**