@@ -40,7 +40,7 @@ formURL c = formURLWith c . allowScopes
40formURLWith :: OAuthClient -> [OAuthScope] -> Text
40formURLWith :: OAuthClient -> [OAuthScope] -> Text
41formURLWith c ss = accountsURL
41formURLWith c ss = accountsURL
42 <> "?response_type=code"
42 <> "?response_type=code"
43− <> "&client_id=" <> toText (_clientId c)
43+ <> "&client_id=" <> toQueryParam (_clientId c)
44 <> "&redirect_uri=" <> redirectURI
44 <> "&redirect_uri=" <> redirectURI
45 <> "&scope=" <> Text.decodeUtf8 (queryEncodeScopes ss)
45 <> "&scope=" <> Text.decodeUtf8 (queryEncodeScopes ss)
@@ -58,9 +58,9 @@ exchangeCode c n = refreshRequest $
58 accountsRequest
58 accountsRequest
59 { Client.requestBody = textBody $
59 { Client.requestBody = textBody $
60 "grant_type=authorization_code"
60 "grant_type=authorization_code"
61− <> "&client_id=" <> toText (_clientId c)
61+ <> "&client_id=" <> toQueryParam (_clientId c)
62− <> "&client_secret=" <> toText (_clientSecret c)
62+ <> "&client_secret=" <> toQueryParam (_clientSecret c)
63− <> "&code=" <> toText n
63+ <> "&code=" <> toQueryParam n
64 <> "&redirect_uri=" <> redirectURI
64 <> "&redirect_uri=" <> redirectURI
@@ -77,7 +77,7 @@ refreshToken c t = refreshRequest $
77 accountsRequest
77 accountsRequest
78 { Client.requestBody = textBody $
78 { Client.requestBody = textBody $
79 "grant_type=refresh_token"
79 "grant_type=refresh_token"
80− <> "&client_id=" <> toText (_clientId c)
80+ <> "&client_id=" <> toQueryParam (_clientId c)
81− <> "&client_secret=" <> toText (_clientSecret c)
81+ <> "&client_secret=" <> toQueryParam (_clientSecret c)
82− <> maybe mempty ("&refresh_token=" <>) (toText <$> _tokenRefresh t)
82+ <> maybe mempty ("&refresh_token=" <>) (toQueryParam <$> _tokenRefresh t)