mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-04-20 18:04:14 +02:00
Tighten up callback expression
This commit is contained in:
parent
1498b5ee33
commit
cc1ddd7d73
@ -101,13 +101,8 @@ withCallbackAndState
|
|||||||
-> Text
|
-> Text
|
||||||
-> m OAuth2
|
-> m OAuth2
|
||||||
withCallbackAndState name oauth2 csrf = do
|
withCallbackAndState name oauth2 csrf = do
|
||||||
let url = PluginR name ["callback"]
|
uri <- ($ PluginR name ["callback"]) <$> getParentUrlRender
|
||||||
render <- getParentUrlRender
|
callback <- maybe (throwError $ InvalidCallbackUri uri) pure $ fromText uri
|
||||||
let callbackText = render url
|
|
||||||
|
|
||||||
callback <- maybe (throwError $ InvalidCallbackUri callbackText) pure
|
|
||||||
$ fromText callbackText
|
|
||||||
|
|
||||||
pure oauth2
|
pure oauth2
|
||||||
{ oauthCallback = Just callback
|
{ oauthCallback = Just callback
|
||||||
, oauthOAuthorizeEndpoint =
|
, oauthOAuthorizeEndpoint =
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user