Skip to content

Commit

Permalink
Clear redirect url of auth after login
Browse files Browse the repository at this point in the history
Previously this was never cleared. Therefore even when you logged in
next time, you were still redirected to the url you accessed at some
point without being logged in.
  • Loading branch information
mpscholten committed Sep 6, 2020
1 parent ba82288 commit 05ee6b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IHP/AuthSupport/Controller/Sessions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ createSessionAction = do
user <- user
|> set #failedLoginAttempts 0
|> updateRecord
redirectUrl <- getSession "IHP.LoginSupport.redirectAfterLogin"
redirectUrl <- getSessionAndClear "IHP.LoginSupport.redirectAfterLogin"
redirectToPath (fromMaybe (afterLoginRedirectPath @record) redirectUrl)
else do
setErrorMessage "Incorrect Password"
Expand Down

0 comments on commit 05ee6b9

Please sign in to comment.