mirror of
https://github.com/immich-app/immich.git
synced 2025-06-03 21:57:07 -04:00
This reverts commit 97c099e26dd35dc89a7a28b84e032e7aa11cba55.
This commit is contained in:
parent
caf76f0713
commit
7ec62f12b5
@ -25,7 +25,6 @@ class SplashScreenPage extends HookConsumerWidget {
|
|||||||
void performLoggingIn() async {
|
void performLoggingIn() async {
|
||||||
bool isSuccess = false;
|
bool isSuccess = false;
|
||||||
bool deviceIsOffline = false;
|
bool deviceIsOffline = false;
|
||||||
|
|
||||||
if (accessToken != null && serverUrl != null) {
|
if (accessToken != null && serverUrl != null) {
|
||||||
try {
|
try {
|
||||||
// Resolve API server endpoint from user provided serverUrl
|
// Resolve API server endpoint from user provided serverUrl
|
||||||
@ -51,11 +50,15 @@ class SplashScreenPage extends HookConsumerWidget {
|
|||||||
offlineLogin: deviceIsOffline,
|
offlineLogin: deviceIsOffline,
|
||||||
);
|
);
|
||||||
} catch (error, stackTrace) {
|
} catch (error, stackTrace) {
|
||||||
|
ref.read(authenticationProvider.notifier).logout();
|
||||||
|
|
||||||
log.severe(
|
log.severe(
|
||||||
'Cannot set success login info',
|
'Cannot set success login info',
|
||||||
error,
|
error,
|
||||||
stackTrace,
|
stackTrace,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
context.pushRoute(const LoginRoute());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,11 +76,6 @@ class SplashScreenPage extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
context.replaceRoute(const TabControllerRoute());
|
context.replaceRoute(const TabControllerRoute());
|
||||||
} else {
|
} else {
|
||||||
log.severe(
|
|
||||||
'Unable to login through offline or online methods - logging out completely',
|
|
||||||
);
|
|
||||||
|
|
||||||
ref.read(authenticationProvider.notifier).logout();
|
|
||||||
// User was unable to login through either offline or online methods
|
// User was unable to login through either offline or online methods
|
||||||
context.replaceRoute(const LoginRoute());
|
context.replaceRoute(const LoginRoute());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user