I’ve written a post-login action and have implemented the onExecutePostLogin and onContinuePostLogin functions. In those functions, depending on who the user logging in is (which of two apps he’s allowed to access, or both apps) I want to send him to a particular URL.
In other words, I want to change the redirect_uri that the login was initiated with, based on who the user is.
I’m operating under the following assumption. In either of the two functions, I should be able to do something like this:
event.transaction.redirect_uri = 'https://theSelectedUri';
Does that actually do anything? My assumption is that when login completes and the user has been authenticated, that’s where he will end up, regardless of the original URI configured for the login.
Please note, I am not talking about performing a api.redirect.sendUserTo. My understanding of that is that the user is redirected with that before authentication is completed, so that custom things can be done in an external page. That’s not what I want to do.
I want to figure out who the user is, where he should go, and then send him there.
In short, is event.transaction.redirect_uri only readable, or is it writable as well?