You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-29 05:21:38 +02:00
feat(web): automatically update user info (#5647)
* use svelte store * fix: websocket error when not authenticated * more routes
This commit is contained in:
@ -34,8 +34,13 @@ export const authenticate = async (options?: AuthOptions) => {
|
||||
if (!savedUser) {
|
||||
setUser(user);
|
||||
}
|
||||
|
||||
return user;
|
||||
};
|
||||
|
||||
export const isLoggedIn = async () => getAuthUser().then((user) => !!user);
|
||||
export const isLoggedIn = async () => {
|
||||
const savedUser = getSavedUser();
|
||||
const user = savedUser || (await getAuthUser());
|
||||
if (!savedUser) {
|
||||
setUser(user);
|
||||
}
|
||||
return user;
|
||||
};
|
||||
|
Reference in New Issue
Block a user