add Identity
Adds a new account to the app referred to by this Webcom instance. The new account is associated to a new identity with the provider
authentication method, whose details (typically msisdn, email or password) are provided by the details
parameter. Currently, only 2 authentication methods are available to add an account: "password" (authentication with email and password) or "phone" (authentication with msisdn and one-time-password).
The identity associated to the newly added account is in the unverified state, so that the actual user cannot authenticate with this identity until it has been verified. To to so, the user receives a verification code or token on the specified msisdn ("phone" method) or email address ("password" method), which must be sent back to the Webcom backend using the Webcom.verifyIdentity method.
Parameters
The authentication method required by the identity associated to the added account. Possible values are "password"
or "phone"
The details of the identity associated to the added account (depends on the chosen authentication method)
Settings of the message to be sent to the user to verify her/his identity
The callback notified when:
the account has been successfully added: in this case, the OnAuth.onComplete method is called with the details of the identity associated to the newly created account,
the account addition has failed: in this case, the OnAuth.onError method is called with the failure reason
Adds a new account to the app referred to by this Webcom instance. See Webcom.addIdentity.
Parameters
The authentication method required by the identity associated to the added account. Possible values are "password"
or "phone"
The details of the identity associated to the added account (depends on the chosen authentication method)
The callback notified when:
the account has been successfully added: in this case, the OnAuth.onComplete method is called with the details of the identity associated to the newly created account,
the account addition has failed: in this case, the OnAuth.onError method is called with the failure reason