@@ -40,7 +40,7 @@ formURL c = formURLWith c . allowScopes
4040formURLWith :: OAuthClient -> [OAuthScope] -> Text
4141formURLWith c ss = accountsURL
4242 <> "?response_type=code"
43− <> "&client_id=" <> toText (_clientId c)
43+ <> "&client_id=" <> toQueryParam (_clientId c)
4444 <> "&redirect_uri=" <> redirectURI
4545 <> "&scope=" <> Text.decodeUtf8 (queryEncodeScopes ss)
4646
@@ -58,9 +58,9 @@ exchangeCode c n = refreshRequest $
5858 accountsRequest
5959 { Client.requestBody = textBody $
6060 "grant_type=authorization_code"
61− <> "&client_id=" <> toText (_clientId c)
62− <> "&client_secret=" <> toText (_clientSecret c)
63− <> "&code=" <> toText n
61+ <> "&client_id=" <> toQueryParam (_clientId c)
62+ <> "&client_secret=" <> toQueryParam (_clientSecret c)
63+ <> "&code=" <> toQueryParam n
6464 <> "&redirect_uri=" <> redirectURI
6565 }
6666
@@ -77,7 +77,7 @@ refreshToken c t = refreshRequest $
7777 accountsRequest
7878 { Client.requestBody = textBody $
7979 "grant_type=refresh_token"
80− <> "&client_id=" <> toText (_clientId c)
81− <> "&client_secret=" <> toText (_clientSecret c)
82− <> maybe mempty ("&refresh_token=" <>) (toText <$> _tokenRefresh t)
80+ <> "&client_id=" <> toQueryParam (_clientId c)
81+ <> "&client_secret=" <> toQueryParam (_clientSecret c)
82+ <> maybe mempty ("&refresh_token=" <>) (toQueryParam <$> _tokenRefresh t)
8383 }