Save refresh token only if not null
Build and deploy the latest docker container / deploy (push) Successful in 57s
Build and release the latest android apk / rolling-release-apk (push) Successful in 4m55s
Build and release a versioned android apk / release-apk (push) Successful in 5m2s

This commit is contained in:
2026-07-03 18:15:22 +02:00
parent 1c5df097c4
commit 4d1dda0263
+9 -2
View File
@@ -101,8 +101,15 @@ class _LoginPageState extends State<LoginPage> {
await apiClient.login(_usernameController.text, _passwordController.text);
// Save credentials for next time
await _saveCredentials(apiClient.refreshToken!);
await _navigateToHome();
if (apiClient.refreshToken == null) {
_log.warning('Login failed, refreshToken is null');
setState(() {
_errorMessage = 'Login failed.\nRefresh token is null';
});
} else {
await _saveCredentials(apiClient.refreshToken!);
await _navigateToHome();
}
} catch (e) {
_log.warning('Login failed', e);
setState(() {