Forum Discussion
authentication trought javascript
Hi, fso thanks for your reply is very helpful. I am in the same situation as you because I'm not a developer, but I understand that your first function creates the link to go to the login site and enter the login credentials for get the access token. but my question is how do to save the access token generated in a variable?
alexanderg, once you successfully logged in, you get redirected to a url that contains a parameter &code=...
This code after the equal symbol is the refresh token. I just manually copy it and store it hardcoded in a variable like
var refreshToken = "AAAAbbbCCC-aaaa-ssss--dddd";
I do not have a programmatic solution to this, but also found that since you can request new access tokens with that refresh token, I never had to re-enter the code again. So for me, it just keeps working.