diff --git a/src/routes/Intro/useAppleLogin.ts b/src/routes/Intro/useAppleLogin.ts index 5ecb88c98..b73cb4d09 100644 --- a/src/routes/Intro/useAppleLogin.ts +++ b/src/routes/Intro/useAppleLogin.ts @@ -9,11 +9,11 @@ type AppleLoginResponse = { type AppleSignInResponse = { authorization: { - code: string; id_token: string; - state: string; }; - user: string; + authorizedData: { + userId: string; + }; email?: string; fullName?: { firstName?: string; @@ -52,8 +52,9 @@ const useAppleLogin = (): [() => Promise, () => void] => { .signIn() .then((response: AppleSignInResponse) => { if (response.authorization) { + console.log('Apple Sign-In response:', response); // eslint-disable-line no-console const email = response.email || ''; - const sub = response.user; + const sub = response.authorizedData.userId; let name = ''; if (response.fullName) { diff --git a/src/types/global.d.ts b/src/types/global.d.ts index 4b46cb22d..f1c3eeecc 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -38,9 +38,10 @@ declare global { }) => void; signIn: () => Promise<{ authorization: { - code: string; id_token: string; - state: string; + }; + authorizedData: { + userId: string; }; user: string; email?: string;