This is different from SSO for your organization, which allows your team members to access the Dfns Dashboard using enterprise identity providers like Okta or Entra ID.
Overview
Dfns supports two methods for end user authentication:| Method | Description | Use case |
|---|---|---|
| Delegated registration | Your service account creates Dfns users on behalf of end users | Full control, works with any auth system |
| Social registration | Users authenticate directly with Google, JWT goes to Dfns | Simpler setup, no service account needed |
- Registration — One-time setup when a user first joins. Creates a Dfns user and passkey credential.
- Login — For returning users. Authenticates the user and returns a Dfns auth token.
Delegated registration
In this method, your backend uses a service account to create and manage Dfns users. This gives you full control over user management and works with any authentication system.Registration (new users)
Use the Delegated Registration flow. Step 1: User authenticates with your system Use your existing auth flow (NextAuth, Auth0, Firebase, custom, etc.). Step 2: Service account creates Dfns userBackend
Frontend
Backend
Login (returning users)
Use the Delegated Login flow. Step 1: Service account initiates loginBackend
Frontend
Backend
Social registration
In this method, users authenticate directly with an identity provider (like Google) and pass the JWT token to Dfns. No service account is required.Registration (new users)
Use the Social Registration flow.Frontend
Login (returning users)
Use the Social Login API.Frontend
Security considerations
- Never expose your service account credentials to the frontend
- Validate tokens on your backend before creating Dfns users
- Use HTTPS for all communications
- Store the mapping between your user IDs and Dfns user IDs securely
- Implement rate limiting on registration endpoints
