New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regenerate access token #30
Conversation
@@ -166,6 +166,7 @@ instance Yesod App where | |||
isAuthorized (EditBidR _) _ = isAuthenticated | |||
isAuthorized HomeR _ = isAuthenticated | |||
isAuthorized ProfileR _ = isAuthenticated | |||
isAuthorized (RegenerateAccessTokenR _) _ = isAuthenticated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace this with isOwnerOrAdmin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handler/RegenerateAccessToken.hs
Outdated
((result, widget), enctype) <- runFormPost $ confirmationForm userId | ||
case result of | ||
FormSuccess confirmation -> do | ||
-- Update acceess token. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to a utility function along with the duplicated code in Foundation.hs
Created PR to |
Confirmation form (to prevent CSRF)
After submit, access token is replaced.