0
votes

I have a Single Page Application where the url structure is typically http://mysite/#myview

I am trying to add this url to the list of authorized redirect URLs in the LinkdIn app settings but I am getting this error message:

enter image description here

Does this mean that there is no way I can redirect back to any url that contains # from LinkedIn API?

I have been able to do this making similar calls to the Twitter API, however they do not require you to register the URLs with them first in the way that LinkedIn does

1
Oauth 2.0 implicit grant returns the token in the hash. That's why it's "reserved", I guess. However, if your flow is server-side, there is nothing to stop you from setting another callback URL, say http://mysite/callback, that in turn does an HTTP redirect to the one you want. - Petko Bossakov
The previous answer shouldn't work according to this: stackoverflow.com/questions/24912899/… - gpoussif

1 Answers

1
votes

Correct - LinkedIn will not allow # symbols in OAuth 2.0 callback URLs, however you can achieve a similar effect by using URL parameters that you internally map back on your side:

https://www.example.com/auth/linkedin?ref=myview

Then your server-side handler could process that ref=myview argument and redirect you to www.example.com/#myview