@auth0/nextjs-auth0 - v4.19.0
    Preparing search index...

    Type Alias AuthCompleteMessage

    AuthCompleteMessage:
        | {
            success: true;
            type: "auth_complete";
            user?: { email: string; sub: string };
        }
        | {
            error: { code: string; message: string };
            success: false;
            type: "auth_complete";
        }

    postMessage payload sent from the popup callback page to the parent window.

    Uses a discriminated union on success for type-safe handling:

    • success: true — MFA completed, optional user metadata attached
    • success: false — error occurred, error code and message attached

    Security: Never contains raw access tokens. Only user metadata (sub, email) is sent via postMessage. Tokens remain server-side in the encrypted session.

    Type Declaration

    • { success: true; type: "auth_complete"; user?: { email: string; sub: string } }
      • success: true
      • type: "auth_complete"
      • Optionaluser?: { email: string; sub: string }

        User metadata from the authenticated session (sub and email only).

    • {
          error: { code: string; message: string };
          success: false;
          type: "auth_complete";
      }
      • error: { code: string; message: string }

        Error details from the callback (OAuth error code + description).

      • success: false
      • type: "auth_complete"