Long lived authentication with OAuth in Android App

心已入冬 提交于 2019-12-13 04:43:57

问题


How can a user grant an Android application permission to access a resource via OAuth until they decide to revoke it? For example, in order to read data from a users Google calendar, an app needs to get an authentication token. How can an app get a long lived authentication token to access calendar data when it needs it?


回答1:


Yes, they can - you'll want to look into OAuth. The user can grant your app limited permission to access their calendar, which is persistent - once you have the OAuth token, you can keep using it until they revoke it. In all likelihood, though, your app will need to send them to your site in the browser to get the OAuth authorization.



来源:https://stackoverflow.com/questions/5534254/long-lived-authentication-with-oauth-in-android-app

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