mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
chore: remove logs & use correct core action
This commit is contained in:
parent
2713c8b46d
commit
2ce1619313
2 changed files with 1 additions and 5 deletions
|
|
@ -118,7 +118,7 @@ const Intro = ({ queryParams }) => {
|
|||
args: {
|
||||
action: 'Authenticate',
|
||||
args: {
|
||||
type: 'AuthWithApple',
|
||||
type: 'Apple',
|
||||
token,
|
||||
sub,
|
||||
email,
|
||||
|
|
|
|||
|
|
@ -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 ?? '';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue