Announcement Announcement Module
No announcement yet.
Dynamic call backurl Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic call backurl

    I'm using spring social in my application to login with facebook/twitter/google. It is working fine. However there are cases where i need to redirect the user to a different url after login dynamically. I know we can 'applicationUrl' attribute can be set in ProviderSignInController. But then this provides an option to set only once for the whole application. Is there a way to change this to set it for every request? If not is there any way out to extend the spring social to achieve this functionality?

  • #2
    Why would you want the callback URL to be different? I can see you wanting the user to land on a different page after signin, but the callback URL *should* be what it is so that ProviderSignInController can complete its work and authenticate the user.

    If what you're wanting, however, is for the user to have a different landing page after authentication is complete, then you can set the postSignInUrl property. But again, that's statically set...probably not what you need.

    With regard to ProviderSignInController, I believe the answer to your question is can't dynamically choose a landing page after signin. You could override oauth1Callback() or oauth2Callback(), but that's not a straightforward override. ConnectController, on the other hand, gives you a couple of places where you can override to set the connected view.

    I'll be willing to entertain an improvement to ProviderSignInController to make this easier, though. Just create an improvement issue at