From 77a3c700c2fa8d443ec907ef833bc86e22edd1fb Mon Sep 17 00:00:00 2001 From: Prateek Jain Date: Mon, 21 Mar 2022 12:49:37 +0530 Subject: [PATCH] Support for real_user_status --- docs/interfaces/appleidtokentype.html | 27 ++++++++++++++++++++++++++- src/AppleSignIn.ts | 8 ++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/docs/interfaces/appleidtokentype.html b/docs/interfaces/appleidtokentype.html index ec36b0d..d6778d0 100644 --- a/docs/interfaces/appleidtokentype.html +++ b/docs/interfaces/appleidtokentype.html @@ -2712,6 +2712,9 @@
  • is_private_email
  • +
  • + real_user_status +
  • iss
  • @@ -2766,6 +2769,7 @@

    Properties

  • exp
  • iat
  • is_private_email
  • +
  • real_user_status
  • iss
  • nonce
  • nonce_supported
  • @@ -2803,7 +2807,7 @@

    auth_time

    auth_time: number
    @@ -2929,6 +2933,27 @@

    Optional is_private_ +
    + +

    Optional real_user_status

    +
    real_user_status: undefined | boolean
    + +
    +
    +

    An Integer value that indicates whether the user appears to be a real person. Use the value of this claim to mitigate fraud. The possible values are: 0 (or Unsupported), 1 (or Unknown), 2 (or LikelyReal). + This claim is present only on iOS 14 and later, macOS 11 and later, watchOS 7 and later, tvOS 14 and later; the claim isn’t present or supported for web-based apps.

    +
    +
    +
    example
    +

    1

    +
    +
    +
    +

    iss

    diff --git a/src/AppleSignIn.ts b/src/AppleSignIn.ts index 2a60579..725a3ff 100644 --- a/src/AppleSignIn.ts +++ b/src/AppleSignIn.ts @@ -128,6 +128,14 @@ export interface AppleIdTokenType { */ is_private_email?: boolean; + /** + * An Integer value that indicates whether the user appears to be a real person. Use the value of this claim to mitigate fraud. + * The possible values are: 0 (or Unsupported), 1 (or Unknown), 2 (or LikelyReal). + * This claim is present only on iOS 14 and later, macOS 11 and later, watchOS 7 and later, tvOS 14 and later; the claim isn’t present or supported for web-based apps. + * @example 2 + */ + real_user_status?: 0|1|2; + auth_time: number; }