Announcement Announcement Module
Collapse
No announcement yet.
Handling the return callback from (linkedIn) authorisation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Handling the return callback from (linkedIn) authorisation

    Hi,

    this is probably a really simple question - but I have a button that authorises users on my webapp with LinkedIn. It directs the user to the LinkedIn authorisation page (using the url connect/linkedin) and when I then say authorise, i get returned to my webapp with an error that the view connect/linkedin is not known.

    My question is, what is the normal/best practice in these situations? is it just expected that I implement a view with this name?

    What I really want to do is just return the user to the previous page (will be the user profile page) but now the page will display data that has been pulled down from linkedIn - should I create a view and direct to the desired page? is there any way to override the returned view?

    thanks!

  • #2
    Yes, that's exactly what you need to do: Implement the view. That is if, as I am assuming, you are using ConnectController to handle the OAuth flow.

    If you look at the Spring Social Showcase sample, you'll see some basic views in src/main/webapp/WEB-INF/view/connect. There are 2 views specific to LinkedIn here:

    - "linkedinConnect" is the view that ConnectController will show when the user hasn't connected with LinkedIn yet and the app is navigated to /connect/linkedin.
    - "linkedinConnected" is the view that ConnectController will show when the user has already connected with LinkedIn yet and the app is navigated to /connect/linkedin.

    That is the default behavior of ConnectController, but it can be overridden by subclassing and overriding the connectView() and connectedView() methods. If you override those methods, then ConnectController could end up showing any view you'd like.

    Comment


    • #3
      Perfect thanks, that makes a lot of sense.

      Comment

      Working...
      X