Skip to main content

Multi-Factor Authentication

The Multi-Factor Authentication (MFA) component enables seamless management of the MFA process for your customers. To use this component, you must generate a customer token with upgradable scopes. These scopes will be granted to the customer upon successful verification.

For instance, if your app includes an ACH debit component requiring the following scopes: customers accounts payments counterparties payments-write counterparties-write, you should issue a customer token with the customers accounts payments counterparties customer-token-write scopes while setting payments-write counterparties-write as upgradable scopes.

Request for customer token with upgradable scope
curl -X POST 'https://api.s.unit.sh/customers/8/token'
-H 'Content-Type: application/vnd.api+json'
-H 'Authorization: Bearer ${TOKEN}'
--data-raw '{
"data": {
"type": "customerToken",
"attributes": {
"scope": "customers accounts payments counterparties customer-token-write",
"upgradableScope": "payments-write counterparties-write"
}
}
}'

Implementation