Redirect to page after login

2
Hi All, I'm using the loginform widget and created a popup login form. If a user needs to be authenticated for an action I show the loginform if the user is not authenticated. The user can login and on success the user is redirected to the homepage (a reload is forced i guess). I do want the user to redirect back to the page where the loginform was triggered. Can I somehow pass this information so after login a redirect/page is called to the location from where the login was triggered? Thanks! Willem Jan
asked
3 answers
1

This sounds like something the sign-in microflow could help you with. The sign-in microflow is automatically executed after a successful signin and has two users as parameter.

In this microflow you could find the data a user has been working on and change that to be specific to the newly authenticated user. I don't think this microflow allows you to open a specific page, but you can give it a try and see what happens.


Depending on your exact scenario you could do the following, show the activity list to the user. When he clicks the button to subscribe, you can create a new subscription associated to the anonymous user, and show the login page (do not show the subscription or give anonymous read/write access to this entity).
During the sign-in microflow you check if there is a new subscription, if there is assign it the the newly authenticated user and set an indicator (if there is no subscription reset the indicator back to default).
In the homepage microflow you then check the indicator that you have set, if necessary retrieve the new subscription and show the subscription page to the user.

answered
0

Thanks, i will look into it.

The idea is the following. We have a list of activities. Anonymous users may browse the list but for subscribing to an activity a user must be authenticated. So when i hit the subscribe button anonymous users get the login popup. After a successful login i want the user to be redirected to the activity and not the homepage...

Regards, Willem Jan

answered
-1

Hi Willem,

I dont get exactly why you want to get a user authenticated, but if it is for anonymous users you can do this like this I think: (I asked a question from a similar case see here)

1 - Using deeplinks

2 - Sign-in microflow to associatie the object to account and after login as user retrieve that object from account

answered