1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Sign In With Apple JS stuck on Continue Button

Discussão em 'Angular' iniciado por Azam Nawaz, Julho 25, 2025.

  1. Azam Nawaz

    Azam Nawaz Guest

    I'm using Apple js in my angular to app for sign in purposes

    this is the code to Init my apple sdk

    AppleID.auth.init({
    clientId: 'net.membertomember.customer',
    scope: 'name email',
    redirectURI: `https://mtmdevelopmentapi.azurewebsites.net/api/Account/AppleCallback/300`,
    usePopup: true,
    });


    I have registered my RedirectURI in Apple Developer Account and it is working fine

    Now as I'm Using usePopup:true I'm also listening for two events that Apple SDK should fire after Auth Process, I'm registering these events after SDK is loaded

    private boundAppleSuccessHandler = this.handleAppleSuccessResponse.bind(this);
    private boundAppleErrorHandler = this.handleAppleErrorResponse.bind(this);

    // Listen for authorization success.
    document.addEventListener(
    'AppleIDSignInOnSuccess',
    this.boundAppleSuccessHandler
    );

    // Listen for authorization failures.
    document.addEventListener(
    'AppleIDSignInOnFailure',
    this.boundAppleErrorHandler
    );


    handleAppleSuccessResponse(event: any) {
    // Handle successful response.
    console.log(event);
    console.log(event.detail.data);

    this.authService.AuthFromLocalStorage = event.detail.data;

    this.authService.getCustomerDetails(event.detail.data.email);
    }

    handleAppleErrorResponse(event: any) {
    // Handle error.
    console.log(event);

    if (event.detail.error == 'popup_closed_by_user') return;

    this.toast.error(event.detail.error_description, event.detail.error);
    }



    When I click on Apple Sign Button Popup Opens it takes my user id and password, and after that screen with continue button appears attached in Image below but on that screen when continue button is clicked, Popup is not closing and my events for "AppleIDSignInOnSuccess" OR "AppleIDSignInOnFailure" are also not firing it just stays there.

    if we inspect popup screen network tab a call to https://appleid.apple.com/appleauth/auth/oauth/authorize is made with body

    {
    "client": {
    "id": "net.membertomember.customer",
    "redirectUri": "https://mtmdevelopmentapi.azurewebsites.net/api/Account/AppleCallback"
    },
    "scopes": [],
    "state": "[STATE]",
    "anonymousEmail": false,
    "nonce": "[NONCE]",
    "responseMode": "web_message",
    "responseType": "code id_token"
    }


    and response

    {
    "authorization": {
    "id_token": "eyJraWQiOiJVYUlJRlkyZlc0IiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJodHRwczovL2FwcGxlaWQuYXBwbGUuY29tIiwiYXVkIjoibmV0Lm1lbWJlcnRvbWVtYmVyLmN1c3RvbWVyIiwiZXhwIjoxNzUzNTI3OTgzLCJpYXQiOjE3NTM0NDE1ODMsInN1YiI6IjAwMDgwNy44ZjE1ZjRjZmFkYjg0YTk1OTc2NDg0NmZjZDgxNzgwYi4xMDM0Iiwibm9uY2UiOiJbTk9OQ0VdIiwiY19oYXNoIjoiYzNSMmJ3QUpKNWFFQkpHT2hZa0RBUSIsImVtYWlsIjoiYXphbS5uYXdhejE1QGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdXRoX3RpbWUiOjE3NTM0NDE1ODMsIm5vbmNlX3N1cHBvcnRlZCI6dHJ1ZX0.CYMTjmHss9JB6y0ODNclJN6-Kh6HEPPbHFcnBKgWVqPWVumlusJAk0k7mImAtqGCP8jR1MpaxRfcac4t7yXG-mmCyLu7TbHTiznnsEaB0-dBIHI9OD6pL72ggMRHPtj-jhsvGTsh5Xr9pIYz_4OEHPDaj7piDGC6zXgWkTTxS1C4SK7lqyBYG1y6DIXd1ZspCQK8JI_Tps0prYkM6W3n6m5Pzau4LhqfvLEpD16VUlqyLqRRhKtcwwOhNqB3UNuRU6vy4bSOV9RnlRYQ0bnjduzrXJen-4frL6DLtKZSQATCR6qJLkG0rbv3VMrGfLKrP-LL3P_KbxeeLuJMNaqq2Q",
    "scope": [
    "name",
    "email"
    ],
    "grant_code": "c06a1d6d8b4fe46f7803c3debb3d86a3f.0.ryqx.WGDnEcjPYft1kZjqEXxKug"
    },
    "authorizedData": {
    "userId": "000807.8f15f4cfadb84a959764846fcd81780b.1034"
    },
    "consentRequired": false,
    "enableSignInWithAppleNewFirstTimeRunScreen": false,
    "consentVersion": 0,
    "reAuthorization": false
    }


    Stuck here on this Screen on continue button

    Continue reading...

Compartilhe esta Página