mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix: empty custom header prevent logging in (#20693)
This commit is contained in:
parent
7118dca559
commit
a573a23c83
2 changed files with 6 additions and 3 deletions
|
|
@ -11,11 +11,14 @@ class WidgetService {
|
|||
|
||||
const WidgetService(this._repository);
|
||||
|
||||
Future<void> writeCredentials(String serverURL, String sessionKey, String customHeaders) async {
|
||||
Future<void> writeCredentials(String serverURL, String sessionKey, String? customHeaders) async {
|
||||
await _repository.setAppGroupId(appShareGroupId);
|
||||
await _repository.saveData(kWidgetServerEndpoint, serverURL);
|
||||
await _repository.saveData(kWidgetAuthToken, sessionKey);
|
||||
await _repository.saveData(kWidgetCustomHeaders, customHeaders);
|
||||
|
||||
if (customHeaders != null && customHeaders.isNotEmpty) {
|
||||
await _repository.saveData(kWidgetCustomHeaders, customHeaders);
|
||||
}
|
||||
|
||||
// wait 3 seconds to ensure the widget is updated, dont block
|
||||
Future.delayed(const Duration(seconds: 3), refreshWidgets);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue