Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AuthParameters

interface

AuthParameters

description

This interface defines the requirements for objects passed as inputs to Auth instances.

Use this interface whenever you are using the Auth contract.

Following inputs apply to the Auth contract class:

Input Type Required? Description
dappIdentifier string Required The dApp identifier, e.g. "elevate".
challenge string Required The authentication challenge used for this log-in operation, e.g. "abcdef12".
refCode string Optional An optional referral code, e.g. "ELEVATE2022".



example

Using the AuthParameters class

// creating authentication contract inputs
const inputs = {
dappIdentifier: "my-cool-dapp",
challenge: "abcdef12",
refCode: "ELEVATE2022",
} as AuthParameters;



Other links

Auth | Contract | Factory

since

v0.3.0

Hierarchy

Index

Properties

challenge: string

The authentication challenge used for said log-in operation. This authentication challenge is added to a transfer transaction message, which must be signed with a dHealth Account.

Note that the value for this field must comply to a set of rules as defined in the backend runtime.

access

public

example

"abcdef12"

var

{string}

dappIdentifier: string

A human-readable dApp identifier, e.g. "ELEVATE".

Note that this field will be slugified using the Contract.dApp method before it is attached to the transfer transaction message.

access

public

example

"My Cool dApp"

var

{string}

refCode?: string

An optional referral code that is linked to another end-user of the dApp. Referral codes permit the dApp to keep track of new users invitations.

Note that the referral code is optional in the Auth contract and may be omitted. If you require the presence of this field, it is recommended to use the Referral contract instead.

access

public

example

"ELEVATE2022"

var

{string}

Generated using TypeDoc