diff --git a/src/composables/useOneTap.ts b/src/composables/useOneTap.ts index 20aa092..de23408 100644 --- a/src/composables/useOneTap.ts +++ b/src/composables/useOneTap.ts @@ -219,7 +219,7 @@ export default function useOneTap( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion client_id: clientId!, callback: (credentialResponse: CredentialResponse) => { - if (!credentialResponse.credential) { + if (!credentialResponse.clientId || !credentialResponse.credential) { onError?.(); return; } diff --git a/src/interfaces/accounts.ts b/src/interfaces/accounts.ts index 68d6e93..09a6725 100644 --- a/src/interfaces/accounts.ts +++ b/src/interfaces/accounts.ts @@ -57,12 +57,12 @@ export interface CredentialResponse { select_by?: SelectBy; /** - * This field is only defined when user clicks a Sign in with Google button to sign in, and the button's state attribute is specified. + * Client ID returned from google * * @type {string} * @memberof CredentialResponse */ - state?: string; + clientId?: string; } /**