Search code examples
grailswebgrails-plugin

redirect after login through grails spring security facebook plugin?


How to redirect after a user logged in to application through spring security facebook plugin. Is there any success handler configuration for facebook plugin?


Solution

  • You can use following JS in your view:

    <facebookAuth:init>
        FB.Event.subscribe('auth.login', function() {
             window.location.href = 'url where to redirect'
        });
    </facebookAuth:init>
    

    See https://github.com/splix/s2-facebook-example for complete example