Force https for oauth

This commit is contained in:
Yegor Vialov
2020-01-29 17:38:51 +00:00
parent 831fc98ab1
commit 9303e4c0a5
2 changed files with 4 additions and 4 deletions

View File

@ -59,9 +59,9 @@ class ConnectionManager {
_token = await storage.read(key: "hacl_llt");
Logger.e("Long-lived token read successful");
oauthUrl = "$httpWebHost/auth/authorize?client_id=${Uri.encodeComponent(
'http://ha-client.estevez.dev')}&redirect_uri=${Uri
'https://ha-client.estevez.dev')}&redirect_uri=${Uri
.encodeComponent(
'http://ha-client.estevez.dev/service/auth_callback.html')}";
'https://ha-client.estevez.dev/service/auth_callback.html')}";
settingsLoaded = true;
} catch (e) {
completer.completeError(HAError("Error reading login details", actions: [HAErrorAction.tryAgain(type: HAErrorActionType.FULL_RELOAD), HAErrorAction.loginAgain()]));