Skip to content

Is there a way to redirect logged-in user to controller action? #732

Answered by s0kil
s0kil asked this question in Q&A
Discussion options

You must be logged in to vote

Here it is:

case currentUserOrNothing of
  Just user -> redirectTo IndexAction
  Nothing -> do
    putStrLn "Do Another Thing Here"
    redirectTo LoginAction

Learn more about accessing current user
There are also multiple redirect functions you might find useful

Replies: 1 comment

Comment options

s0kil
Jan 31, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by s0kil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant