From 3f2bf3cc6e2d26091ec7bcafd298c1c999c083ec Mon Sep 17 00:00:00 2001 From: David Mosbach Date: Tue, 30 Jan 2024 04:30:00 +0000 Subject: [PATCH] adjusted grant type for refresh tokens --- src/Server.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Server.hs b/src/Server.hs index 7ff1de3..976d463 100644 --- a/src/Server.hs +++ b/src/Server.hs @@ -200,8 +200,8 @@ instance FromHttpApiData AuthFlow where instance FromForm ClientData where fromForm f = ClientData - <$> ((parseUnique @AuthFlow "grant_type" f) *> ((Left . ACode <$> parseUnique "code" f) - <|> (Right <$> parseUnique "refresh_token" f))) + <$> (((parseUnique @AuthFlow "grant_type" f) *> (Left . ACode <$> parseUnique "code" f)) + <|> ((parseUnique @String "refresh_token" f) *> (Right <$> parseUnique "refresh_token" f))) <*> parseMaybe "client_id" f <*> parseMaybe "client_secret" f <*> parseMaybe "redirect_uri" f