verificationId
. Your application uses the verificationId
to poll the status of the request.
.env
file. The API calls to create and poll the verification request require repeated access to Auth0 variables. We recommend you set these variables as environment variables in your application.
For a Next.js application, edit the .env.local file and set the corresponding values:
AUTH0_DOMAIN
: The Domain specified under the application’s BasicInformation in . Defines the Application performing the Verification Request.PROTOCOL
: The protocol determines the method used for interacting with the wallet.TEMPLATE_ID
: The Template ID from the template you created.VERIFICATION_BEARER_TOKEN
: The Verification Bearer Token that is generated based on your , , , and Grant Type that allows your application to call the Verification Service.family_name
given_name
birth_date
issue_date
expiry_date
issuing_country
issuing_authority
portrait
driving_privileges
resident_address
portrait_capture_date
age_in_years
age_birth_year
age_over_NN
issuing_jurisdiction
nationality
resident_city
resident_state
resident_postal_code
resident_country
family_name_national_character
given_name_national_character
HTTP
calls to the Mobile Driver’s License Verification API.process.env
object:
handler()
function handles HTTP
requests in an API route.
run()
function makes a POST
request to the Mobile Driver’s License Verification API to start a verification request. The returned object has two variables:
engagement
: The URIwith the verification request information for the end user’s wallet to consume.
verificationId
: Auth0’s unique identifier of the verification request.
node-fetch
library and load the required environment variables.
HTTP
handler is similar to the previous one, but the Verification ID must be extracted from the Verification POST
request body so your application can exchange the requested claims with Auth0:
run()
function. This function uses the Verification ID to exchange the requested claims with Auth0 and returns the result.