diff --git a/src/definitions.ts b/src/definitions.ts index d576e9f..f534874 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -93,4 +93,16 @@ export interface GoogleAuthPlugin { * @since 3.1.0 * */ initialize(options?: Partial): void; + + /** + * Add additional scopes request for user + * @since 3.2.0 + * */ + addScopes(scopes: string[]): Promise; + + /** + * Remove additional scopes request for user + * @since 3.2.0 + * */ + removeScopes(scopes: string[]): Promise; } diff --git a/src/web.ts b/src/web.ts index 4be08ee..93c74aa 100644 --- a/src/web.ts +++ b/src/web.ts @@ -110,6 +110,16 @@ export class GoogleAuthWeb extends WebPlugin implements GoogleAuthPlugin { }); } + async addScopes(scopes: string[]) { + // TODO: web + return; + } + + async removeScopes(scopes: string[]) { + // TODO: web + return; + } + async refresh() { const authResponse = await gapi.auth2.getAuthInstance().currentUser.get().reloadAuthResponse(); return {