From c8819a4deea4bb4121398efa1b1b188a3be64d28 Mon Sep 17 00:00:00 2001 From: mgifos Date: Wed, 24 Apr 2019 11:01:14 +0200 Subject: [PATCH] Garmin Connect Login Failure #53 quickfix --- src/main/scala/com.github.mgifos.workouts/GarminConnect.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/com.github.mgifos.workouts/GarminConnect.scala b/src/main/scala/com.github.mgifos.workouts/GarminConnect.scala index 47fbe15..e6424e5 100644 --- a/src/main/scala/com.github.mgifos.workouts/GarminConnect.scala +++ b/src/main/scala/com.github.mgifos.workouts/GarminConnect.scala @@ -258,9 +258,9 @@ class GarminConnect(email: String, password: String)(implicit system: ActorSyste .singleRequest( HttpRequest( POST, - Uri("https://sso.garmin.com/sso/login").withQuery(Query(params)), + Uri("https://sso.garmin.com/sso/signin").withQuery(Query(params)), entity = FormData(Map("username" -> email, "password" -> password, "embed" -> "false")).toEntity - ).withHeaders(extractCookies(res1))) + ).withHeaders(extractCookies(res1)).withHeaders(Origin("https://sso.garmin.com"))) .withoutBody sessionCookies <- redirectionLoop(0, "https://connect.garmin.com/modern", extractCookies(res2)) } yield GarminSession(sessionCookies)