Reading Janrain docs I found two properties that should instruct janrain to redirect after login (http://developers.janrain.com/reference/javascript-api/registration-js-api/settings/#registration-flow):
redirectOnLogin - Set this to enabled, or disabled. The redirectUri will only be used when this value is set to enabled.
redirectUri - Set the URL for where to redirect after a successful registration or login.
I tried to set these two properties on janrain demo site (http://demos.janrain.com/JanrainDemoSites/):
janrain.settings.capture.redirectOnLogin = 'enabled';
janrain.settings.capture.redirectUri = 'http://demos.janrain.com/test';
But I don't get redirected after login. Am I missing something?
Thanks.
With the Janrain Registration widget the most reliable (and in my opinion the best) way to redirect after a successful login is to use the Javascript Event Handlers.
For a "standard" widget configuration (without SSO or any other integrations) you would use the following event handlers to perform your redirection:
and
Depending on the version of your widget you can usually have all the event handlers logged to the browser console by making sure the following line in your janrain-init.js file is uncommented:
Having all the events logged will allow you to see what the final events are that occur after a successful login or registration. You want to make sure that you don't redirect before all the necessary widget events are completed. For example if you are using SSO then there are typically some additional SSO events that get fired off after the above two events. Redirecting before the SSO events get fired will prevent the SSO session from getting properly set up.
Hope this helps.