Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,16 @@ export interface GoogleAuthPlugin {
* @since 3.1.0
* */
initialize(options?: Partial<InitOptions>): void;

/**
* Add additional scopes request for user
* @since 3.2.0
* */
addScopes(scopes: string[]): Promise<void>;

/**
* Remove additional scopes request for user
* @since 3.2.0
* */
removeScopes(scopes: string[]): Promise<void>;
}
10 changes: 10 additions & 0 deletions src/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down