Skip to content

Commit

Permalink
Merge pull request #80 from lzdyes/main
Browse files Browse the repository at this point in the history
fix: Google One Tap callback response does not contain clientId
  • Loading branch information
kasvith committed Jul 26, 2024
2 parents 7c15d7d + 1458707 commit ff826cb
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 ff826cb

Please sign in to comment.