OAuth1
Grants
Password grant
await exh.auth.authenticate({
email:'john.doe@example.com',
password:'myPassword1234'
});MFA Grant
try {
await exh.auth.authenticate({
password: '',
email: '',
});
} catch (error) {
if (error instanceof MfaRequiredError) {
const mfaToken = error.mfa.token;
const mfaMethods = error.mfa.methods;
// Your logic to request which method the user want to use in case of multiple methods
const methodId = mfaMethods[0].id;
await exh.auth.confirmMfa({
token: mfaToken,
methodId: methodId,
code: '', // code from ie. Google Authenticator
});
}
// handle other possible authentication errors
}SSO Token Grant
Tokens
Retrieve a list of active tokens
Revoking tokens
SSO
Generate SSO Tokens
Last updated