On this page
Passwordless login links combine authentication and navigation: a link must establish the intended session and then send the user to an approved destination. Before release, test both parts together, including what happens when a link is expired, reused, or altered.
This checklist is for backend developers and QA teams testing a non-production environment with disposable accounts. The link may itself be a bearer credential, so handle it as a secret throughout the test.
Key Takeaways
- Test valid, expired, already-used, and malformed links, including their final redirect destinations.
- Check the authenticated account and session separately from the redirect; a successful redirect does not prove authentication is correct.
- Test destination validation across the entire redirect chain, including error paths.
- Keep tokens out of screenshots, analytics, logs, and shared reports. Use sanitized evidence instead.
- Confirm expiry and single-use behavior against your identity provider’s current documentation before release.
Prepare a Safe Test Environment
- Use a staging or isolated test environment with disposable accounts and non-production links. Do not forward links from real users.
- Record the expected destination allowlist, including permitted origins and paths, and the expected outcome for each token state. Include the intended behavior when a destination is missing or rejected.
- Arrange separate test links for each case. A link opened by a browser, automated preview, or inspection tool may be consumed before the intended test.
- Identify where authentication is performed: by your application, an identity provider, or both. Establish which component owns expiry, replay prevention, session creation, and redirect validation.
- Define an evidence-handling procedure. Restrict access to any temporary network capture and remove it after review according to your team’s retention policy.
Documentation limitation: Current OWASP guidance and identity-provider documentation were not available for review for this checklist. Before release, consult the current OWASP authentication and session-management guidance and your provider’s official passwordless-link documentation. Confirm the configured expiry, single-use semantics, error behavior, and any link-scanner considerations for your integration. Do not assume all providers behave identically.
Advertisement
Test Passwordless Login Links Before Release
For each case, record the test ID, token state, destination category, final page, and whether the expected disposable account has a session. Do not record the link or token itself.
| Case | Setup and action | Release check |
|---|---|---|
| Valid | Open a fresh link for account A with an approved destination. | Account A is authenticated and reaches the intended approved destination. No other account is signed in. |
| Expired | Let a separate link expire according to the configured policy, then open it. | No new session is created; the user receives a safe recovery path, such as requesting another link. |
| Already used | Successfully redeem a link, then open that same link again in a fresh session. | The second attempt does not create another authenticated session if the integration requires single use. Confirm the exact expected behavior with the provider. |
| Malformed | Try a missing token, a truncated token, and an altered token in separate requests. | No authenticated session is created. The response is safe, and any redirect remains within approved destinations. |
| Wrong or disallowed destination | Pair a valid test flow with a destination outside the allowlist or an invalid destination value. | The application rejects it or uses a documented safe fallback; it never sends the user to the disallowed destination. |
- Repeat the valid and failure cases with the browser already signed in as a different disposable account. Check that the application does not silently associate the link with the wrong identity or leave QA uncertain which account is active.
- Where single use is required, attempt near-simultaneous redemption from two isolated sessions. At most one should establish a new session. Coordinate this test with the identity provider’s documented behavior and your own session-creation logic.
- Check expiry at the boundary as well as well after it. Record the configured policy and account for any documented clock tolerance; do not infer exact timing from a single attempt.
- Test a link opened by an email-security scanner or preview service if that is part of your delivery path. Check whether it consumes the link or causes unintended session creation, and follow the provider’s supported mitigation.
Inspect the Redirect Chain
Use browser developer tools or a controlled test client in the authorized environment to observe each redirect and the final destination. Treat the resulting network data as sensitive: request URLs and response headers can contain the token.
- Verify every redirect destination, not just the last page. An intermediate hop to an unapproved host is still a failure even if the flow eventually returns.
- Check successful authentication, invalid-token, expired-token, and fallback paths. Error handling can have different redirect logic from the happy path.
- Exercise destination inputs such as an external absolute URL, a protocol-relative URL, an unexpected scheme, and encoded or malformed values. Validate the parsed destination against the application’s allowlist rather than relying on a string prefix.
- Confirm that the token does not persist in the final page URL, where it could be copied or exposed later. Also inspect
Locationheaders and any intermediate URLs under the same restricted evidence procedure. - Check that failures do not disclose token details or unnecessary account information to the user.
A Redirect Checker can inspect redirect behavior, but it cannot establish token validity, account identity, or the security of the login flow. Do not submit a real login link to an external checker unless your organization has explicitly approved that handling: the checker may receive the credential and follow or consume the link. Prefer a token-free, non-production redirect fixture when using a checker.
Advertisement
Check for Token Exposure
- Screenshots and recordings: Capture the result page without the address bar or redact sensitive values before the image leaves the restricted test environment. Check browser tabs and notifications too.
- Analytics: Confirm that page-view URLs, query parameters, events, and error reports do not send login tokens to analytics or other third parties.
- Logs: Inspect relevant application, proxy, and identity-integration logging paths for full request URLs or token-bearing headers. Configure exclusion or redaction at each applicable layer, including before data reaches shared log storage.
- Shared reports: Use a case ID and a sanitized redirect description, not a copied link, network archive, raw header, or screenshot containing a token.
- Browser and page behavior: Review referrer behavior and third-party resources on token-processing pages. Set an appropriate referrer policy and avoid exposing a token-bearing URL to unnecessary scripts or external requests.
If a token is exposed, follow your team’s incident procedure and invalidate it where supported. Redacting a report afterward does not undo prior access to the credential.
Common Mistakes
- Checking only the final page. This can miss an unsafe intermediate redirect or an unexpected authenticated account.
- Reusing one link across tests. A prior test, preview, or scanner may change its state and make results misleading.
- Treating a redirect inspection as an authentication test. Verify session identity and replay behavior separately.
- Testing only success. Invalid and expired links often use different routes and error handlers.
- Sharing raw evidence. Network captures and logs can expose credentials even when a test report looks harmless.
Release Decision
- All required matrix cases pass against the documented integration behavior.
- Redirects, including failure and intermediate hops, stay within the approved destination policy.
- Token exposure checks are complete, and test evidence is sanitized and appropriately retained.
- The team has reviewed current OWASP guidance and the provider’s documentation, resolved mismatches, and documented any accepted residual risk.
Conclusion
Release only after the team has checked both authentication outcomes and redirect destinations using isolated, disposable tests. Treat the links and their diagnostic traces as credentials, and verify provider-specific behavior rather than assuming it.
What would your domain sell for?
A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.