OAuth Registration
Vlens supports OAuth 2.0 authentication via Google and Microsoft (Azure AD B2C). Users can register and log in using an existing social account — skipping the email OTP verification step.
Setup
OAuth providers must be configured in the Vlens portal before use:
- Google — create OAuth client credentials in the Google Cloud Platform Console
- Microsoft — set up credentials in Azure AD B2C
Contact your Vlens administrator to enable and link the client credentials to your tenant.
How it works
Step 1 — Verify the OAuth token
After your app obtains an ID token from the provider, send it to Vlens for verification:
cURL
JavaScript
Python
Response:
Save oAuthTokenVerificationRequestId — it is required in Step 2.
Step 2 — Complete registration
Pass the oAuthTokenVerificationRequestId alongside the standard StepCreate fields. This replaces the emailOtpRequestId — email is already verified by the OAuth provider.
cURL
JavaScript
Python
On success the user is registered and a user access token is returned — same as the standard registration flow.
Skip email for an existing user
If a user is already registered but has not verified their email, use VerifyOAuthToken to verify the email via OAuth instead of sending an email OTP:
The response is the same shape as StepVerifyOAuthToken — use the returned oAuthTokenVerificationRequestId to complete the pending registration step.

