alexbruf/elm-clerk/2.0.0

Clerk.Verification

The Clerk verification resource, the state of one attempt to verify an email address, phone number, wallet or external account.

Every field is nullable because ClerkJS leaves them unset until the matching step of the flow has run.

type alias Verification =
{ status : Maybe String
, strategy : Maybe String
, expireAt : Maybe Posix
, error : Maybe String
, message : Maybe String
, nonce : Maybe String
, externalVerificationRedirectURL : Maybe String
, verifiedAtClient : Maybe String
}

The verification attached to another resource.

error is the message of the underlying ClerkAPIError, not the whole error object. externalVerificationRedirectURL is the URL as a string. Passkey publicKey is browser-only and is deliberately not serialized.

decoder : Decoder Verification

Decode a Verification from the JSON the shim sends.

{ "status": "verified"
, "strategy": "email_code"
, "expireAt": 1700003600000
, "error": null
, "message": null
, "nonce": null
, "externalVerificationRedirectURL": null
, "verifiedAtClient": null
}