mirror of
https://github.com/freckle/yesod-auth-oauth2.git
synced 2026-01-11 19:58:28 +01:00
Check for ErrorResponse before CSRF
It's possible there's an error that explains why the state token isn't as expected. It should be fine to report those details before verifying CSRF.
This commit is contained in:
parent
db3b87d264
commit
b6f1a70e5d
@ -81,8 +81,8 @@ dispatchCallback
|
||||
-> FetchCreds site
|
||||
-> m TypedContent
|
||||
dispatchCallback name oauth2 getToken getCreds = do
|
||||
csrf <- verifySessionCSRF $ tokenSessionKey name
|
||||
onErrorResponse $ throwError . OAuth2HandshakeError
|
||||
csrf <- verifySessionCSRF $ tokenSessionKey name
|
||||
code <- requireGetParam "code"
|
||||
manager <- authHttpManager
|
||||
oauth2' <- withCallbackAndState name oauth2 csrf
|
||||
|
||||
Loading…
Reference in New Issue
Block a user