View all services
Talk to QA Advisor
Browse the Knowledge Hub56 resources
/Test Cases/SSO and social login test cases

Test cases

SSO test cases, including the one that hands over the account

Twenty eight cases covering account linking on an unverified email, provider email changes, state and authorisation code replay, redirect allow lists, token signature and issuer validation, group to role mapping, deprovisioning, session rotation and single sign out.

28cases/8coverage types/15security cases/FreeCSV download

All 28 test cases, ready to copy

Free to use and adapt, no sign-up. Download as CSV or Markdown, or copy it straight into your own tooling.

Last updated

28 worked examples

SSO-01

Sign in through the provider for the first time

TypeFunctionalPriorityHigh
Test data
A new user completing the provider consent screen
Expected result
Account is created, the provider identity is linked, a session is issued and the user lands on the intended destination rather than a generic dashboard.
SSO-02

Sign in again and match the existing identity

TypeFunctionalPriorityHigh
Test data
The same provider account signing in a second time
Expected result
Existing account is reused with no duplicate created, and the match is made on the immutable provider subject identifier rather than on the email address.
SSO-03

Refuse to link an account on an unverified email

TypeSecurityPriorityHigh
Test data
A provider response whose email matches an existing account but is not marked verified
Expected result
Automatic linking is refused and explicit proof of ownership is required. Linking on an unverified email is a complete account takeover path.
SSO-04

Handle a provider email that changed since first sign in

TypeStatePriorityHigh
Test data
The same provider subject returning with a different email address
Expected result
Account is still matched on the subject identifier and the email is updated, rather than a second account being created under the new address.
SSO-05

Handle two providers returning the same email address

TypeBoundaryPriorityHigh
Test data
The same person signing in through two different providers with one email
Expected result
Documented rule is applied consistently: either both link after verification or the second is refused with an explanation. Silent merging is not acceptable.
SSO-06

Reject a callback with a missing or mismatched state value

TypeSecurityPriorityHigh
Test data
A callback with the state parameter removed, then with a value from another session
Expected result
Both refused. The state parameter is the cross site request forgery defence for this flow, and an unchecked callback lets an attacker attach their identity to a victim session.
SSO-07

Reject a replayed authorisation code

TypeSecurityPriorityHigh
Test data
Exchange a code successfully, then submit the same code again
Expected result
Second exchange is refused. An authorisation code is single use and short lived, and reuse is treated as a signal to invalidate the issued tokens.
SSO-08

Reject a callback redirect target that is not registered

TypeSecurityPriorityHigh
Test data
A redirect parameter pointing at an external host, a subdomain, and a path traversal variant
Expected result
All refused against an exact allow list. Prefix matching on the redirect value is bypassed by an attacker controlled subdomain or suffix.
SSO-09

Validate the token signature and issuer

TypeSecurityPriorityHigh
Test data
A token with an altered payload, one signed by a different key, one with the algorithm set to none, and one from another issuer
Expected result
Every case refused. Algorithm is pinned rather than read from the token header, and issuer and audience are both checked.
SSO-10

Reject an expired or not yet valid token

TypeBoundaryPriorityHigh
Test data
A token one second past expiry and one with a future issued time beyond the permitted clock skew
Expected result
Both refused. Clock skew tolerance is small and explicit rather than generous enough to make expiry meaningless.
SSO-11

Return the user to the originally requested page

TypeFunctionalPriorityMedium
Test data
Request a deep protected page while signed out, then complete sign in
Expected result
User lands on the original page, and the stored return path is validated as internal so it cannot be used as an open redirect.
SSO-12

Handle the user cancelling at the consent screen

TypeNegativePriorityMedium
Test data
Decline consent, then close the provider window mid flow
Expected result
User returns to a clear state with an explanation and no half created account, and no session is issued in either case.
SSO-13

Handle a provider outage or timeout

TypeStatePriorityHigh
Test data
Make the provider unreachable during the redirect and during the token exchange
Expected result
A clear recoverable message with an alternative sign in route where one exists, rather than a stack trace or an infinite redirect loop.
SSO-14

Prevent an infinite redirect loop

TypeNegativePriorityHigh
Test data
A user whose account is disabled or lacks any assigned role signing in successfully at the provider
Expected result
A single clear message explaining the block. Redirecting back to sign in on authorisation failure produces a loop the user cannot escape.
SSO-15

Map provider groups to application roles

TypeFunctionalPriorityHigh
Test data
A user in a mapped group, an unmapped group, and no groups at all
Expected result
Correct role assigned, unmapped groups grant nothing, and no groups results in the least privileged state rather than a default administrative one.
SSO-16

Apply a role change on the next sign in

TypeStatePriorityHigh
Test data
Remove a user from a privileged group at the provider while their session is active
Expected result
Privileges are revoked within the documented window rather than persisting until the session expires days later.
SSO-17

Deprovision a user disabled at the provider

TypeSecurityPriorityHigh
Test data
Disable the account at the identity provider, then use an existing application session and a refresh token
Expected result
Both are refused. A session that outlives deprovisioning is the gap that keeps a departed employee inside the application.
SSO-18

Restrict sign in to permitted email domains

TypeSecurityPriorityHigh
Test data
An address on a permitted domain, an unpermitted one, and a lookalike domain differing by one character
Expected result
Only the exact permitted domain is accepted, matched on the full domain rather than a substring, so a lookalike is refused.
SSO-19

Enforce tenant isolation on a shared provider

TypeSecurityPriorityHigh
Test data
A user valid at the provider but belonging to a different tenant of the application
Expected result
Refused. Successful authentication at a shared provider is not authorisation for a specific tenant workspace.
SSO-20

Rotate the session identifier after authentication

TypeSecurityPriorityHigh
Test data
Capture the pre-authentication session identifier and compare it after sign in
Expected result
A new identifier is issued. Reusing the pre-authentication session allows a fixation attack in which the attacker already holds the identifier.
SSO-21

Set session cookie attributes correctly

TypeSecurityPriorityHigh
Test data
Inspect the session cookie after sign in
Expected result
Marked secure and http only with an appropriate same site value and a scoped path, and no token appears in a URL, in local storage or in a server log.
SSO-22

Link an additional provider to an existing account

TypeFunctionalPriorityMedium
Test data
A signed in user linking a second provider, then linking one already attached to another account
Expected result
First succeeds after re-authentication, second is refused rather than silently moving the link between accounts.
SSO-23

Prevent unlinking the last sign in method

TypeNegativePriorityHigh
Test data
Unlink the only linked provider on an account with no password set
Expected result
Refused with an explanation, because completing it locks the user out of their own account permanently.
SSO-24

Require step up authentication for a sensitive action

TypeSecurityPriorityHigh
Test data
Change email, change payment details and delete the account using a long lived session
Expected result
Re-authentication is required for each, and a session old enough to have been stolen cannot perform a destructive action unchallenged.
SSO-25

Sign out of the application and the provider session

TypeStatePriorityHigh
Test data
Sign out, then press the browser back button and reuse the previous session cookie
Expected result
Session is invalidated on the server rather than only cleared in the browser, and the documented single sign out behaviour is applied.
SSO-26

Invalidate every session on request

TypeSecurityPriorityHigh
Test data
Sign in on three devices, then sign out everywhere from one
Expected result
All sessions and refresh tokens are invalidated, which is the control a user relies on after suspecting a compromise.
SSO-27

Complete the flow inside an embedded or restricted browser

TypeCompatibilityPriorityMedium
Test data
An in app browser, a private window with third party cookies blocked, and a pop up blocked by the browser
Expected result
Flow completes or degrades to a full page redirect with a clear message, rather than failing silently with a blank screen.
SSO-28

Complete sign in with a keyboard and a screen reader

TypeAccessibilityPriorityMedium
Test data
Keyboard only navigation through the provider buttons, the return journey and any error state
Expected result
Every provider option is reachable and labelled with its purpose, focus is placed sensibly on return, and errors are announced rather than only shown.

What goes in each field

ID

Required

Stable identifier, prefixed by module.

Test case

Required

What is being verified, in one line.

Type

Functional, negative, boundary, security, state, performance, accessibility or compatibility. Use it to check coverage is spread rather than clustered on the happy path.

Priority

Risk based. Anything that can attach a session to the wrong account, allow account takeover through an unverified identifier, or leave access alive after it has been revoked is High.

Test data

The specific values, including the invalid and boundary ones.

Expected result

Required

The precise observable outcome, including message text where the wording itself is the requirement.

How To Use This

Send an unverified email that matches

Sign in works on the first try for the person who built it. These four conditions are where identity flows hand over accounts.

Link on an unverified email

A provider response whose email matches an existing account but is not marked verified. Automatic linking here is a complete account takeover, and it needs one test.

Match on subject, not on email

Return the same provider subject with a changed email address. Matching on email creates a second account; matching on the immutable subject identifier does not.

Tamper with the callback

Remove the state parameter, then replay the authorisation code. Both are single use, single purpose values, and an unchecked callback attaches an attacker identity to a live session.

Disable the user at the provider

Then use the existing application session and its refresh token. A session that outlives deprovisioning is how a departed employee keeps their access.

What Most Sets Miss

Why identity defects hand over accounts

The unverified email is the defect worth building this set around. A provider returns an email claim, that claim matches an existing account, and the implementation links them and issues a session. If the provider did not verify the address, anyone who can create an account at that provider using a victim address now owns the victim account in your application. The rule is simple and rarely tested: never link automatically on an unverified identifier, and match returning users on the immutable subject identifier rather than on the email, because email addresses change and are not unique across providers.

The callback parameters carry the security of the whole flow and both are commonly unchecked. The state value is the cross site request forgery defence, and without it an attacker can complete their own authorisation and have the resulting identity attached to a victim browser session. The authorisation code is single use, and a successful replay should not merely fail but should invalidate the tokens already issued for that exchange. Redirect validation belongs in the same group and needs an exact allow list, because prefix or substring matching is defeated by an attacker controlled subdomain.

Token validation fails in ways that look like success. An implementation that reads the algorithm from the token header rather than pinning it will accept a token signed with none. One that checks the signature but not the issuer and audience will accept a valid token minted for a different application. And a generous clock skew tolerance makes expiry decorative. Each of these is a single case with a crafted token, and each one is the difference between authentication and the appearance of it.

Finally, the lifecycle is where enterprise deployments actually get burned. Group membership changes at the provider need to reach the application within a documented window rather than at the next natural session expiry, and a user disabled at the provider must not be able to continue on an existing session or refresh token. The related cases are unglamorous and matter: rotate the session identifier after authentication to prevent fixation, require step up authentication before a destructive action, and make sign out invalidate on the server rather than merely clearing a cookie in one browser.

Suggest an improvement

Testing an SSO or identity integration?

QAble tests authentication flows end to end, including account linking rules, token validation, redirect handling, deprovisioning and session lifecycle.

Security testing services

More test case sets

View all

Test cases for a login page

Test cases
25 cases across functional, negative, boundary, security, session and accessibility paths, including account enumeration and lockout.

Test cases for a registration form

Test cases
28 cases covering validation, duplicate accounts, email verification, password rules and the enumeration leak most signup forms ship with.

Test cases for search functionality

Test cases
28 cases across relevance, partial and fuzzy matching, filters, pagination, empty states, injection attempts and performance under load.

Test cases for a shopping cart

Test cases
27 cases on quantity limits, price recalculation, stock changes, coupon stacking, guest to account merge and cart persistence.

Test cases for checkout and payment

Test cases
30 cases including 3D Secure, declines, timeouts, duplicate charges, idempotency, refunds and partial captures.

Test cases for file upload

Test cases
28 cases on size and type limits, spoofed content types, malicious filenames, progress, resume, virus scanning and storage limits.

Test cases for forgot password

Test cases
26 cases on reset token expiry, single use enforcement, session invalidation and the enumeration and rate limit gaps that are routine here.

Test cases for OTP verification

Test cases
26 cases on expiry, resend throttling, attempt limits, code reuse, delivery failure and the brute force window teams forget to close.

Test cases for user roles and permissions

Test cases
26 cases on horizontal and vertical privilege checks, direct object access, role changes mid-session and permission inheritance.

Test cases for form validation

Test cases
27 rules-based cases on required fields, length and numeric boundaries, client and server parity, hidden field tampering and error accessibility.

Test cases for a date picker

Test cases
26 cases on timezone shifts, ambiguous day and month order, impossible dates, min and max limits, leap years and keyboard operation.

Test cases for pagination

Test cases
24 cases on ordering stability, records changing mid-session, page size caps, deep offset cost, permission-filtered totals and state restore.

Test cases for push notifications

Test cases
26 cases on app states, deep link routing, token release on sign out, lock screen privacy, preferences, provider failures and platform differences.

Test cases for reports and data export

Test cases
25 cases on permission filtering in the file, spreadsheet formula injection, encoding, typed numbers and dates, row limits and audit logging.

Test cases for a chatbot

Test cases
28 cases on paraphrased intents, context, fallback loops, human handoff, policy grounding, prompt injection and data scoping.

Test cases for net banking transactions

Test cases
28 cases on duplicate debits from a retried request, concurrent transfers against one balance, daily limits across channels, beneficiary cooling periods, second factor binding and reconciliation.

Test cases for wallet and UPI payments

Test cases
28 cases on payments that time out with no response, idempotency on retry, racing balances, caps across devices, collect request fraud, mandates and refunds.

Test cases for insurance claim submission

Test cases
28 cases on coverage at the date of loss, waiting periods, deductibles and sub limits, exclusions and riders, duplicate claims and settlement reconciliation.

Test cases for patient records in an EHR

Test cases
28 cases on duplicate detection and merge, wrong patient entry, units of measure, allergy and interaction alerting, break glass access and audit of reads.

Test cases for CRM lead management

Test cases
28 cases on duplicate leads under concurrency, routing and the unrouted fallback, round robin races, territory visibility, conversion and bulk import.

Test cases for an ERP purchase order

Test cases
28 cases on approval thresholds, amendments that must reset approval, budget commitment races, over receipt tolerance, three-way match and duplicate invoices.

Test cases for OTT video playback

Test cases
28 cases on bitrate recovery after a dip, DRM renewal mid stream, concurrent stream limits and leaked slots, resume conflicts, ad cue points and offline expiry.

Test cases for game level progression

Test cases
28 cases on save corruption during a crash write, cloud save conflicts, offline queue replay, unlock gating, currency exploits and purchase restore.

Test cases for a REST API

Test cases
28 cases on status code correctness, cross tenant resource access, mass assignment, idempotent retries, cursor pagination, rate limits and contract drift.

Test cases for subscription and billing

Test cases
28 cases on mid cycle proration, duplicate and out of order webhooks, renewal double charges, dunning and grace, trials, coupons, metered usage and tax.

Test cases for data tables, filters and sorting

Test cases
28 cases on unstable sorts across pages, filters that must reset pagination, selection surviving a filter change, bulk action scope and export fidelity.

Test cases for session timeout and concurrent login

Test cases
28 cases on tokens that survive sign out, refresh token reuse, idle against absolute lifetime, multi tab expiry, session limits and remote revocation.

Test cases for a multi step form wizard

Test cases
28 cases on values lost to back navigation, refresh and session expiry, step skipping, server side revalidation, duplicate submission and conditional branches.

Test cases for email verification

Test cases
28 cases on token reuse and expiry, invalidating earlier links, account enumeration, header injection, safe address change and mail scanner prefetching.

Test cases for dashboards and analytics widgets

Test cases
28 cases on reconciling against source rows, widgets that disagree, timezone aggregation, zero baselines, no data shown as zero and permission leaks in aggregates.

Test cases for booking and reservation

Test cases
28 cases on concurrent bookings for the last slot, inventory holds that leak, payment without a booking, cancellation boundaries and channel sync.

Test cases for mobile app install and update

Test cases
28 cases on migration chains across skipped versions, crashes during post upgrade migration, forced update lockouts, deep links and clean reinstall.

Test cases for accessibility (WCAG 2.2 AA)

Test cases
28 cases on keyboard only completion, focus management, live region announcements, contrast, reflow at 320 pixels, target size and screen reader verification.

Test cases for performance and load

Test cases
28 cases on spikes with no ramp, recovery after peak, soak and leak detection, pool exhaustion, cold caches, retry storms and data correctness under load.

Test cases for the OWASP Top 10

Test cases
28 cases on broken access control, mass assignment, injection across every input surface, credential stuffing, session invalidation, SSRF and exposed secrets.

Test cases for cross browser compatibility

Test cases
28 cases on storage that throws in private mode, blocked third party cookies, engine date parsing, mobile viewport units, in app browsers and ad blockers.

Test cases for database and data integrity

Test cases
28 cases on uniqueness under concurrency, lost updates, counter races, orphaned rows, migration and backfill safety, replica lag and verified restores.

Test cases for localisation and multi language support

Test cases
28 cases on text expansion, concatenated sentences, plural rules, locale date parsing, decimal separators, right to left layout, collation and encoding.

Want your identity flow proven, not assumed?

QAble covers functional, boundary and security paths with ISTQB-certified engineers. Start with a free QA audit of your application.

Talk to QA Advisor