Dōrvis

Sign in

Security recommendations

Dorvis verifies the identity, and you protect the session and data in your app. These recommendations follow OpenID Connect and OAuth 2.0 good practice.

In the request

  • Generate a new state and nonce for every request and check them on return
  • Use PKCE with S256 even when your app has a secret
  • Use only HTTPS redirect URIs in production
JavaScriptpkce.mjs
import crypto from 'node:crypto';

const verifier = crypto.randomBytes(32).toString('base64url');
const challenge = crypto.createHash('sha256').update(verifier).digest('base64url');
// send challenge with code_challenge_method=S256, keep verifier in the session
// and post it as code_verifier when exchanging the code

The secret

  • Keep client_secret in environment variables or a secret store, never in the repository
  • If the secret leaks, regenerate it in the portal and the old one stops working at once
  • Create separate integrations for testing and production

Tokens and session

  • Verify the ID token signature, iss, aud, exp and nonce
  • After login create your own session with an HttpOnly, Secure and SameSite cookie
  • Do not send the ID token or personal code to the browser unless needed
  • Do not write tokens or full personal codes to logs

What Dorvis does

  • Provider keys and your credentials are kept in a separate secure vault
  • Every login is recorded for statistics and audit
  • Dorvis runs in Latvia, and data processing complies with GDPR

Did not find the answer?

Write to us and a developer will reply.

Ask a question
Loading complete

We use cookies to make this website easier to use. Read our Privacy and Cookie Policy.