Skip to content

Commit

Permalink
fix: Google One Tap callback response does not contain clientId
Browse files Browse the repository at this point in the history
  • Loading branch information
lzdyes committed Jul 24, 2024
1 parent 7c15d7d commit 1458707
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/composables/useOneTap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.clientId || !credentialResponse.credential) {
if (!credentialResponse.credential) {
onError?.();
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export interface CredentialResponse {
select_by?: SelectBy;

/**
* Client ID returned from google
* 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.
*
* @type {string}
* @memberof CredentialResponse
*/
clientId?: string;
state?: string;
}

/**
Expand Down

0 comments on commit 1458707

Please sign in to comment.