Google OAuth2 Client
Minimal compatibility-first Google OAuth2 client implementation
This library is a minimal implementation of the
google-auth-library project, designed to be compatible with NodeJS, the browser and React Native. The
google-auth-library package has had problems with compatibility in this regard and rather than wait for that to get sorted, this library was released to solve the exact problem without the overhead of project politics, wait times and package excess (extra features not needed that are causing the incompatibilities in the first place).
This library is targeted at NodeJS but should work everywhere.
Install by running
npm install @buttercup/google-oauth2-client --save.
OAuth2Client class to get started, similarly to the original implemenation:
;const client ="my-client-id""my-client-secret""";const authURL = client;
The following methods are implemented:
||Generate an authorisation URL|
||Get the tokens for an authorisation code|
||Refresh the tokens|