add "oauth_callback" query to authorizeUrl
This commit is contained in:
parent
717d4deda5
commit
d244e03c79
@ -128,7 +128,10 @@ getTemporaryCredential' hook oa = do
|
|||||||
authorizeUrl :: OAuth -- ^ OAuth Application
|
authorizeUrl :: OAuth -- ^ OAuth Application
|
||||||
-> Credential -- ^ Temporary Credential (Request Token & Secret)
|
-> Credential -- ^ Temporary Credential (Request Token & Secret)
|
||||||
-> String -- ^ URL to authorize
|
-> String -- ^ URL to authorize
|
||||||
authorizeUrl oa cr = oauthAuthorizeUri oa ++ BS.unpack (renderSimpleQuery True [("oauth_token", token cr)])
|
authorizeUrl oa cr = oauthAuthorizeUri oa ++ BS.unpack (renderSimpleQuery True queries)
|
||||||
|
where queries = case oauthCallback oa of
|
||||||
|
Nothing -> [("oauth_token", token cr)]
|
||||||
|
Just callback -> [("oauth_token", token cr), ("oauth_callback", callback)]
|
||||||
|
|
||||||
-- | Get Access token.
|
-- | Get Access token.
|
||||||
getAccessToken, getTokenCredential
|
getAccessToken, getTokenCredential
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user