I'm trying to authenticate a LinkedIn user via Oauth.
Now, if the user has a single LinkedIn account, everything works fine.
However if there are multiple accounts, LinkedIn is always sending me back the first account. There is no way for the user to choose the account he wants.
I tried adding a prompt parameter to the authorization url as below but no success.
Here is what I tried:
const url = `https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=${clientId}&redirect_uri=${encodeURIComponent(callbackURL)}&state=${encodeURIComponent(state)}&scope=${encodeURIComponent(scopes)}&prompt=consent`; //Observe the prompt parameter at the end of the url which I added but still it didn't allow the user to choose an account
Any ideas on resolving this would be truly appreciated.
Thanks.