Google Auth using Token

我是研究僧i 提交于 2019-12-11 00:56:47

问题


I've an android application that needs to navigate to a google service webpage (say calendar). Because I already have a Auth Token (using Android Accounts manager), I want to skip user being redirected to web login. Would auto-login be possible using authtoken ? If yes, what is the exact Url with params


回答1:


you would append ?auth= to the url. I don't know if that works with all google urls, but for google voice and a couple others i've seen it work.




回答2:


You need to use a cookie.

First do a GET on this URL with the auth token at the end: http://.appspot.com/_ah/login?continue=/stats&auth=

Then extract the cookie from the response and add it to the HTTP headers of all subsequent requests.



来源:https://stackoverflow.com/questions/3067780/google-auth-using-token

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!