Go to developer

OAuth Verify

Add KEYRA as passwordless authentication for your website or app — then validate the result on your backend before creating a session.

On this page

What is OAuth Verify?

OAuth Verify is KEYRA's PKCE authorization-code flow for passwordless user verification. The browser starts the flow with a publishable client id (cp_*). KEYRA hosts verification. Your backend must call POST /verify/validate before trusting the user.

BROWSER                 YOUR BACKEND              KEYRA                USER
   │                          │                      │                    │
   │ Start (publishable cp_*) │                      │                    │
   ├────────────────────────────────────────────────►│                    │
   │ authorize_url            │                      │                    │
   │◄────────────────────────────────────────────────┤                    │
   │ Open popup/redirect      │                      │                    │
   │                          │                      │◄─── verify ────────┤
   │ authorization code       │                      │                    │
   │◄────────────────────────────────────────────────┤                    │
   │ Token exchange (PKCE)    │                      │                    │
   ├────────────────────────────────────────────────►│                    │
   │ access_token             │                      │                    │
   │ (= verification_token)   │                      │                    │
   │◄────────────────────────────────────────────────┤                    │
   │ POST token to backend    │                      │                    │
   ├─────────────────────────►│                      │                    │
   │                          │ POST /verify/validate│                    │
   │                          ├─────────────────────►│                    │
   │                          │ valid + user         │                    │
   │                          │◄─────────────────────┤                    │
   │                          │ Create YOUR session  │                    │
   │ Set app session cookie   │                      │                    │
   │◄─────────────────────────┤                      │                    │
High-level OAuth Verify path

When should I use OAuth Verify?

  • You want KEYRA as the primary (or primary-adjacent) passwordless login experience.
  • You can register an exact callback / redirect URI for your app.
  • You have a backend that can validate the verification token.

If you already authenticate users and only need step-up 2FA, use Partner 2FA instead — see Choose your integration.

OAuth Verify vs Partner 2FA

OAuth VerifyPartner 2FA
Primary purposePasswordless KEYRA authenticationStep-up verification on existing login
Existing login required?NoYes
Browser integrationPaste script or @keyra/web-sdkQR UI only; APIs stay on server
Browser credentialsPublishable cp_* onlyNone (secrets server-side)
Backend requiredYes — /verify/validate before sessionYes — Partner secret APIs + consume
Recommended forNew KEYRA login experiencesAdding KEYRA to existing auth

Three integration levels

The trust boundary