Pure JS Solution for authorizing user?


#1

Hi,

I am planning to use the same method a @anywhere does to get access token with Javascript only. Is this flow supported by twitter or is it likely to change ?

1 - Query for access token in a popup :

https://oauth.twitter.com/2/authorize?oauth_callback_url=http://XXX.net:2000//twitter_callback.html&oauth_mode=flow_web_client&oauth_client_identifier=XXX

2 - parse access token in twitter_callback.html
http://XXX.net:2000//twitter_callback.html#oauth_access_token=fdsfds&oauth_bridge_code=DJP4Ffdsfds0hE1DMeLj5fdsfdsfsdfsdftlBKqBU1mG1QuRXl3bk
3- pass the token to the parent window.

window.opener.setToken(accessToken);

I can not find any official documentation on this, but found out this technique but observing @anywhere behaviour and reading this http://www.slideshare.net/danwrong/building-anywhere-for-txjs

thanks

-seb


#2

Sorry, you are forbidden from using the implementation details of @Anywhere in any way other than through @Anywhere as directly documented on this site.