mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 11:42:05 +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: {
|
args: {
|
||||||
action: 'Authenticate',
|
action: 'Authenticate',
|
||||||
args: {
|
args: {
|
||||||
type: 'AuthWithApple',
|
type: 'Apple',
|
||||||
token,
|
token,
|
||||||
sub,
|
sub,
|
||||||
email,
|
email,
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ type AppleSignInResponse = {
|
||||||
};
|
};
|
||||||
|
|
||||||
type CustomJWTPayload = JwtPayload & {
|
type CustomJWTPayload = JwtPayload & {
|
||||||
sub: string;
|
|
||||||
email?: string;
|
email?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -55,12 +54,9 @@ const useAppleLogin = (): [() => Promise<AppleLoginResponse>, () => void] => {
|
||||||
|
|
||||||
window.AppleID.auth.signIn().then((response: AppleSignInResponse) => {
|
window.AppleID.auth.signIn().then((response: AppleSignInResponse) => {
|
||||||
if (response.authorization) {
|
if (response.authorization) {
|
||||||
console.log('Apple Sign-In response:', response.authorization); // eslint-disable-line no-console
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const idToken = response.authorization.id_token;
|
const idToken = response.authorization.id_token;
|
||||||
const payload: CustomJWTPayload = jwtDecode(idToken);
|
const payload: CustomJWTPayload = jwtDecode(idToken);
|
||||||
console.log('Decoded id_token:', payload); // eslint-disable-line no-console
|
|
||||||
const sub = payload.sub;
|
const sub = payload.sub;
|
||||||
const email = payload.email ?? response.email ?? '';
|
const email = payload.email ?? response.email ?? '';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue