OAuth 2.0 and OpenID Connect Testing: A QA Security Checklist
Authentication flows often pass happy path checks while leaving serious gaps in redirect validation, token handling, scope enforcement, and session boundaries. OAuth 2.0 and OpenID Connect testing should verify protocol behaviour and the application permissions that depend on it.
Map the flows and trust boundaries
List supported clients, grant types, identity providers, redirect URIs, token audiences, scopes, and session lifetimes. Test each supported flow separately. Public clients should use Authorization Code with PKCE rather than relying on a client secret embedded in an app.
Validate redirect URI handling
Test exact registered redirects, unregistered hosts, lookalike domains, altered paths, encoded characters, open redirects, and malformed callback parameters. The authorization server must not send authorization codes or tokens to an untrusted destination.
Test PKCE and authorization codes
Verify that a valid code verifier succeeds and missing, incorrect, reused, or expired verifiers fail. Authorization codes should be short lived and single use. Test code substitution and attempts to redeem a code through a different client.
Inspect token claims and lifecycle
Check issuer, audience, expiry, not before, signature, algorithm, key rotation, and required claims. Verify that expired or incorrectly scoped tokens are rejected. Test refresh token rotation, reuse detection, revocation, and logout behaviour where supported.
Verify scopes and object permissions
A valid token does not automatically authorize every action. Test least privilege across read, write, administrative, and tenant specific operations. Try changing resource identifiers and roles to ensure the API checks authorization on every request.
Test browser and mobile session boundaries
Check state and nonce validation, CSRF protection, secure cookie attributes, session fixation, logout, and account switching. For mobile clients, verify app link or universal link ownership and ensure callback handling cannot be hijacked by another application.
Automate negative cases safely
Use a dedicated identity provider tenant and test accounts. Avoid production tokens and real user data. Keep cryptographic fixtures deterministic, but include integration checks for actual issuer metadata and signing key discovery. Report failures with claim names and correlation IDs, never raw bearer tokens.
Related QA resources
Continue with accessibility testing, API automation, and software supply chain security. For a structured view of your current automation risks, explore the QA Automation Health Check.
QA AUTOMATION HEALTH CHECK
Know what to improve first.
Get an independent review of test reliability, automation architecture, and CI with prioritized findings and a practical 30 day plan.
Explore the review →