fix/NI-189-login-logic - #120
Open
pwadmore-ea wants to merge 16 commits into
Open
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the post-login redirect mechanism to avoid carrying the destination in URLs by storing the intended destination server-side (cache) and using an opaque, short-lived redirectToken HttpOnly cookie to retrieve it after Azure AD login.
Changes:
- Store unauthenticated users’ current path in a cache keyed by a UUID token and set the token in an HttpOnly
redirectTokencookie. - Update
/loginhandler to resolve the token to a redirect path, clear the cookie, and drop the cached token. - Add config/documentation/tests for redirect-token TTL and the new redirect behavior; remove
redirectTofrom the login link.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/routes/index-happy.js | Adds integration-style tests for cookie behavior and login fallback redirect. |
| test/routes/auth.js | Adds unit tests for /login handler error and redirect-token resolution behavior. |
| test/config.js | Adds tests for redirect-token TTL derivation and validation. |
| server/views/layout.html | Removes redirectTo query parameter from the login link. |
| server/routes/auth.js | Switches login handler to async and redirects via cached redirect token. |
| server/index.js | Adds redirect-token cookie + cache policy, and sets cookie during view responses for unauthenticated requests. |
| server/config.js | Adds redirect token TTL config and derived redirectTokenTtlMs. |
| readme.md | Documents REDIRECT_TOKEN_TTL_MINUTES. |
| docker/.env.example | Documents redirect-token TTL env var usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pwadmore-ea
force-pushed
the
fix/NI-189-login-logic
branch
from
July 21, 2026 20:39
5c706f3 to
cd25c9b
Compare
pwadmore-ea
marked this pull request as draft
July 21, 2026 20:48
pwadmore-ea
force-pushed
the
fix/NI-189-login-logic
branch
from
July 22, 2026 13:28
8915168 to
e79ea67
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
pwadmore-ea
marked this pull request as ready for review
July 22, 2026 14:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



https://eaflood.atlassian.net/browse/NI-189