Skip to content

Commit 445f663

Browse files
committed
fix(GoogleLogin): guarantee credential presence onSuccess
1 parent 498cf95 commit 445f663

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/@react-oauth/google/src/GoogleLogin.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ import {
1212

1313
const containerHeightMap = { large: 40, medium: 32, small: 20 };
1414

15+
type SuccessfulCredentialResponse = Omit<CredentialResponse, 'credential'> & {
16+
credential: string;
17+
};
18+
1519
export type GoogleLoginProps = {
16-
onSuccess: (credentialResponse: CredentialResponse) => void;
20+
onSuccess: (credentialResponse: SuccessfulCredentialResponse) => void;
1721
onError?: () => void;
1822
promptMomentNotification?: MomentListener;
1923
useOneTap?: boolean;

0 commit comments

Comments
 (0)