adjusted grant type for refresh tokens

This commit is contained in:
David Mosbach 2024-01-30 04:30:00 +00:00
parent 9f3f9d47b5
commit 3f2bf3cc6e

View File

@ -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