From ec7df9a6dd59984857aaea9f4fab8083a9dc756e Mon Sep 17 00:00:00 2001 From: Kasun Vithanage Date: Fri, 26 Jul 2024 15:19:36 +0530 Subject: [PATCH] Revert "fix: Google One Tap callback response does not contain clientId" --- src/composables/useOneTap.ts | 2 +- src/interfaces/accounts.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; } /**