Change domain for ha-client website

This commit is contained in:
Yegor Vialov
2020-01-29 17:31:02 +00:00
parent 2003005e56
commit 831fc98ab1
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("http://ha-client.homemade.systems/service/auth_callback.html")) {
if (url.startsWith("http://ha-client.estevez.dev/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('http://ha-client.homemade.systems')}"
data: "grant_type=authorization_code&code=$authCode&client_id=${Uri.encodeComponent('http://ha-client.estevez.dev')}"
).then((response) {
Logger.d("Got temp token");
String tempToken = json.decode(response)['access_token'];