chore: remove logs & use correct core action

This commit is contained in:
Timothy Z. 2025-04-10 21:52:57 +03:00
parent 2713c8b46d
commit 2ce1619313
2 changed files with 1 additions and 5 deletions

View file

@ -118,7 +118,7 @@ const Intro = ({ queryParams }) => {
args: {
action: 'Authenticate',
args: {
type: 'AuthWithApple',
type: 'Apple',
token,
sub,
email,

View file

@ -22,7 +22,6 @@ type AppleSignInResponse = {
};
type CustomJWTPayload = JwtPayload & {
sub: string;
email?: string;
};
@ -55,12 +54,9 @@ const useAppleLogin = (): [() => Promise<AppleLoginResponse>, () => void] => {
window.AppleID.auth.signIn().then((response: AppleSignInResponse) => {
if (response.authorization) {
console.log('Apple Sign-In response:', response.authorization); // eslint-disable-line no-console
try {
const idToken = response.authorization.id_token;
const payload: CustomJWTPayload = jwtDecode(idToken);
console.log('Decoded id_token:', payload); // eslint-disable-line no-console
const sub = payload.sub;
const email = payload.email ?? response.email ?? '';