Search code examples
oauth-2.0podio

Podio js: Revoke access and refresh tokens


Is it possible to revoke:

  1. Access tokens;
  2. Refresh tokens;

using the Podio-js library?


Solution

  • You can invalidate the current user access_token using the Invalidate Tokens endpoint.
    The access token can still be refreshed using the refresh_token

    var PodioJS = require('podio-js');
    PodioJS.request('POST', '/oauth/token/invalidate', {});
    

    Using the Invalidate Grant endpoint instead invalidate both tokens, which means that the user is effectively logged out.

    var PodioJS = require('podio-js');
    PodioJS.request('POST', '/oauth/grant/invalidate', {});