UNPKG

vue3-google-signin

Version:

Google Sign-in for Vue3 with Google Identity Service

35 lines (34 loc) 1.82 kB
import type { CodeClient, CodeClientConfig, OverridableTokenClientConfig, TokenClientConfig, TokenResponse } from "../interfaces/oauth2"; import type { IdConfiguration, MomentListener, GsiButtonConfiguration, RevocationCallback } from "../interfaces/accounts"; declare global { interface Window { google?: { accounts: { id: { initialize: (idConfiguration: IdConfiguration) => void; prompt: (momentListener?: MomentListener) => void; renderButton: (parent: HTMLElement, options: GsiButtonConfiguration, clickHandler?: () => void) => void; disableAutoSelect: () => void; storeCredential: (credential: { id: string; password: string; }, callback?: () => void) => void; cancel: () => void; onGoogleLibraryLoad: () => void; revoke: (hint: string, callback?: RevocationCallback) => void; }; oauth2: { initTokenClient: (config: TokenClientConfig) => { requestAccessToken: (overridableClientConfig?: OverridableTokenClientConfig) => void; }; initCodeClient: (config: CodeClientConfig) => CodeClient; hasGrantedAnyScope: (tokenResponse: TokenResponse, firstScope: string, ...restScopes: string[]) => boolean; hasGrantedAllScopes: (tokenResponse: TokenResponse, firstScope: string, ...restScopes: string[]) => boolean; revoke: (accessToken: string, done?: () => void) => void; }; }; }; } } declare const _default: {}; export default _default;