feat(mobile): use custom headers when connecting in widget (#20666)

* feat(mobile): use custom headers when connecting in widget

* delete log in android widget

* chore: code review changes
This commit is contained in:
Brandon Wees 2025-08-05 10:29:27 -05:00 committed by GitHub
parent 7a7843467c
commit 13d43e193e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 58 additions and 8 deletions

View file

@ -121,7 +121,9 @@ class AuthNotifier extends StateNotifier<AuthState> {
Future<bool> saveAuthInfo({required String accessToken}) async {
await _apiService.setAccessToken(accessToken);
await _widgetService.writeCredentials(Store.get(StoreKey.serverEndpoint), accessToken);
final serverEndpoint = Store.get(StoreKey.serverEndpoint);
final customHeaders = Store.get(StoreKey.customHeaders);
await _widgetService.writeCredentials(serverEndpoint, accessToken, customHeaders);
// Get the deviceid from the store if it exists, otherwise generate a new one
String deviceId = Store.tryGet(StoreKey.deviceId) ?? await FlutterUdid.consistentUdid;