How to reset google oauth 2.0 authorization?

前端 未结 4 1095
无人及你
无人及你 2020-12-05 15:03

I\'m using Google APIs Client Library for JavaScript (Beta) to authorize user google account on web application (for youtube manipulations). Everything works fine, but i hav

4条回答
  •  抹茶落季
    2020-12-05 15:37

    Its very simple. Just revoke the access.

    void RevokeAcess()
    {
        try{
        HttpClient client = new DefaultHttpClient();
        HttpPost post = new HttpPost("https://accounts.google.com/o/oauth2/revoke?token="+ACCESS_TOKEN);
        org.apache.http.HttpResponse response = client.execute(post);
        }
        catch(IOException e)
        {
        }
    }
    

    But it should be in asyncTask

提交回复
热议问题