@@ -13,7 +13,7 @@ module Network.Google.Auth.InstalledApplication where
1313import Control.Monad.Catch (MonadCatch)
1414import Control.Monad.IO.Class (MonadIO)
1515import qualified Data.Text.Encoding as Text
16−import Network.Google.Auth.Scope (queryEncodeScopes)
16+import Network.Google.Auth.Scope (Allow (..), queryEncodeScopes)
1717import Network.Google.Internal.Auth
1818import Network.Google.Internal.Logger (Logger)
1919import Network.Google.Prelude
@@ -30,8 +30,14 @@ redirectURI = "urn:ietf:wg:oauth:2.0:oob"
3030-- with 'exchangeCode'.
3131--
3232-- /See:/ <https://developers.google.com/accounts/docs/OAuth2InstalledApp#formingtheurl Forming the URL>.
33−formURL :: OAuthClient -> [OAuthScope] -> Text
34−formURL c ss = accountsURL
33+formURL :: Allow s => OAuthClient -> proxy s -> Text
34+formURL c = formURLWith c . getScopes
35+
36+-- | Form a URL using 'OAuthScope' values.
37+--
38+-- /See:/ 'formURL'.
39+formURLWith :: OAuthClient -> [OAuthScope] -> Text
40+formURLWith c ss = accountsURL
3541 <> "?response_type=code"
3642 <> "&client_id=" <> toText (_clientId c)
3743 <> "&redirect_uri=" <> redirectURI