Skip to content

[OGUI-1949] Add basic API auth routes - #3714

Open
isaachilly wants to merge 5 commits into
feature/ILG/OGUI-1939/vite-dev-serverfrom
feature/FRM/OGUI-1949/Add-api-auth-routes
Open

isaachilly wants to merge 5 commits into
feature/ILG/OGUI-1939/vite-dev-serverfrom
feature/FRM/OGUI-1949/Add-api-auth-routes

Conversation

@isaachilly

@isaachilly isaachilly commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

I have JIRA issue created

  • branch and/or PR name(s) includes JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected
  • FLP integration tests were ran successful

Ticket:

Code:

Add the apiAuthRoutes HTTP option (default false). When on, auth routes are registered under /api.
/api/login always starts a fresh login.
/api/callback is new callback handled.
Adapt sessionService to accept a loginUrl, when there is no token, it redirects to it.

Reviewer:

@isaachilly isaachilly self-assigned this Oct 29, 2026
@isaachilly
isaachilly changed the base branch from dev to feature/ILG/OGUI-1939/vite-dev-server November 9, 2026 16:33
@isaachilly
isaachilly force-pushed the feature/FRM/OGUI-1949/Add-api-auth-routes branch from 28a4b7d to 6953c5d Compare November 9, 2026 16:34
@isaachilly
isaachilly added this pull request to stack #3702 November 10, 2026 13:38
@isaachilly
isaachilly force-pushed the feature/FRM/OGUI-1949/Add-api-auth-routes branch from f627e3f to 7e3552a Compare November 10, 2026 15:45
@isaachilly
isaachilly removed this pull request from stack #3702 November 11, 2026 16:55
@isaachilly
isaachilly added this pull request to stack #3734 November 11, 2026 16:56
Add optional api auth routes, plus a frontend session redirect to start login when no token is present.

Add tests to cover the new auth flows.
When the /api/login path is not registered the router falls back to /api, /api requires auth in its middleware and thus we get 403 not 404.
Redirect read result from evaluate that triggers the navigation. Catch this error and also store the result in session storage.
@isaachilly
isaachilly force-pushed the feature/FRM/OGUI-1949/Add-api-auth-routes branch from a2b7696 to 82a998a Compare November 11, 2026 18:58
Comment on lines +203 to +206
this.app.get('/api/login', (req, res) => {
delete req.query.token;
return this.openid ? this.ident(req, res) : this.addDefaultUserData(req, res);
});
@isaachilly
isaachilly marked this pull request as ready for review November 11, 2026 19:33
@isaachilly
isaachilly requested a review from graduta as a code owner November 11, 2026 19:33
@isaachilly isaachilly changed the title [OGUI-1949] Add basic API auth parameters [OGUI-1949] Add basic API auth routes Nov 12, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants