Move to ha-client.app

This commit is contained in:
Yegor Vialov
2020-02-12 13:22:26 +00:00
parent c8d7e1a95f
commit f495a6affc
7 changed files with 13 additions and 13 deletions

View File

@ -14,7 +14,7 @@ class AuthManager {
Completer completer = Completer();
final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.onUrlChanged.listen((String url) {
if (url.startsWith("https://ha-client.estevez.dev/service/auth_callback.html")) {
if (url.startsWith("https://ha-client.app/service/auth_callback.html")) {
Logger.d("url=$url");
String authCode = url.split("=")[1];
Logger.d("authCode=$authCode");
@ -23,7 +23,7 @@ class AuthManager {
endPoint: "/auth/token",
contentType: "application/x-www-form-urlencoded",
includeAuthHeader: false,
data: "grant_type=authorization_code&code=$authCode&client_id=${Uri.encodeComponent('https://ha-client.estevez.dev')}"
data: "grant_type=authorization_code&code=$authCode&client_id=${Uri.encodeComponent('https://ha-client.app')}"
).then((response) {
Logger.d("Got temp token");
String tempToken = json.decode(response)['access_token'];