function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Austin VillanuevaAustin Villanueva 

get authorization/access token from url of pop up window NEED HELP!! ASAP

I am having a problem of accessing the code or access_token when the user successfully log in, javascript doesn't allow me to access the
window.location.href property so that I can get the access_token or authorization_code so that I can continue and make a soql query.
I also tried to use the username and password authentication it works but I'm not sure if using this authentication will need the 
account of the person's USERNAME and PASSWORD who create the connected app just to log in? Also, it requires the SECURITY_TOKEN, 
Is this security token universal to the user's who want to log to the connected app? 

I hope you can help me because I'm not sure about how the other users can access the connected app using the username password if this is the only way I could do if I accessing the url of the pop up window is not possible. 
JLA.ovhJLA.ovh
To get an access token from your remote app, you should configure it as a canvas app. You will get the value in the context sent during the POST. You will need to parse the signed request (server side) to retrieve it