mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(web,server): disable password login (#1223)
* feat(web,server): disable password login * chore: unit tests * chore: fix import * chore: linting * feat(cli): server command for enable/disable password login * chore: update docs * feat(web): confirm dialogue * chore: linting * chore: linting * chore: linting * chore: linting * chore: linting * chore: fix web test * chore: server unit tests
This commit is contained in:
@@ -22,6 +22,15 @@ export const oauth = {
|
||||
const search = location.search;
|
||||
return search.includes('code=') || search.includes('error=');
|
||||
},
|
||||
isAutoLaunchDisabled: (location: Location) => {
|
||||
const values = ['autoLaunch=0', 'password=1', 'password=true'];
|
||||
for (const value of values) {
|
||||
if (location.search.includes(value)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getConfig: (location: Location) => {
|
||||
const redirectUri = location.href.split('?')[0];
|
||||
console.log(`OAuth Redirect URI: ${redirectUri}`);
|
||||
|
||||
Reference in New Issue
Block a user