Can not get token back from OAuth callback URL using CurrentPage.parameters

We have a connected app for which the callback URL is a visualforce page.


When the callback URL is invoked, Saleforce appends a # at the end of the callback URL and passes a bunch of parameters.

However I can not retrieve any of the parameters e.g $CurrentPage.parameters.access_token gives me a empty string.

Anyone know how to get parameters from a callback URL.

We can get the parameters without any problem from a normal URL (i.e without the #)
Looks like the # breaks the ability of the VF page to get the parameters

  • you can try to use JS to parse URL and get parameters
    – kurunve
    Jul 27, 2017 at 16:57
  • JS parsing would not be considered safe. Jul 27, 2017 at 20:30
  • Any specific reasons why JS parsing would not be considered safe?
    – kurunve
    Jul 28, 2017 at 6:19


You must log in to answer this question.

Browse other questions tagged .