alexbruf/elm-clerk/2.0.0

Clerk.PhoneNumber

The Clerk phone number resource, one entry of Clerk.User's phoneNumbers.

type alias PhoneNumber =
{ id : String
, phoneNumber : String
, verification : Verification
, reservedForSecondFactor : Bool
, defaultSecondFactor : Bool
, linkedTo : List IdentificationLink
, backupCodes : List String
}

One of a user's phone numbers.

backupCodes is empty unless ClerkJS has issued backup codes for this number as a second factor.

decoder : Decoder PhoneNumber

Decode a PhoneNumber from the JSON the shim sends.

{ "id": "idn_2"
, "phoneNumber": "+15555550100"
, "verification": Verification
, "reservedForSecondFactor": true
, "defaultSecondFactor": false
, "linkedTo": [ IdentificationLink ]
, "backupCodes": [ "abcd-1234" ]
}

Both lists are [] when ClerkJS has nothing to send.