From f6d7cb63764bdefa7672329000f19fb10640dccc Mon Sep 17 00:00:00 2001
From: Hugo <hnouts@grandlyon.com>
Date: Mon, 20 Apr 2020 14:22:42 +0200
Subject: [PATCH] state needs to remain the same from authorize endpoint to
 token

---
 main.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main.go b/main.go
index 6bfa24d..eb623b7 100644
--- a/main.go
+++ b/main.go
@@ -21,7 +21,7 @@ func main() {
 		fmt.Println(query)
 		host := strings.Split(query.Get("state"), "-")[1]
 		fmt.Println(host)
-		state := strings.Split(query.Get("state"), "-")[0]
+		state := query.Get("state")
 		fmt.Println(state)
 		usagePointId := query.Get("usage_point_id")
 		fmt.Println(usagePointId)
-- 
GitLab