[LinkedIn Connector] User Provider of the connector must be the same

Forge Component
Published on 2018-12-11 by OutSystems R&D
5 votes
Published on 2018-12-11 by OutSystems R&D

I was trying to call the LinkedIn Connector from an eSpace that had a different User Provider:

-Caller eSpace (CustomUserProvider)

-Connector (Users)

And because of this I was getting a missing token message. After changing the Connector user provider it worked.

Hi João,

Sorry for the delayed response.

The behavior you described is actually as designed. I'll explain why.

The LinkedIn Connector uses Session Variables to store data, including authentication tokens. All this Session Data gets associated to the Connector's User provider (Users by default).

Since your Consumer app has a different User Provider, a user logging into it also has a different Session, where the Connector's Session Variables are empty. Without valid authentication tokens all the Connector's methods fail.

This behavior is somewhat described in this documentation page regarding Single Sign-On. The last paragraph under "How Sessions are Shared" is the relevant one.

So the solution you already had it - set the same User Provider in the Connector as the one in your Consumer module.

On our end, we will add a note to the Connector's documentation, as changing the User Provider in scenarios like yours is a necessary setup step.

I hope this helps, let me know if it doesn't :)