Skip to content

Comments

Logout API / SSO Enhancements#922

Open
shobhitupadhyayy wants to merge 3 commits intodevfrom
feature/cmg-686
Open

Logout API / SSO Enhancements#922
shobhitupadhyayy wants to merge 3 commits intodevfrom
feature/cmg-686

Conversation

@shobhitupadhyayy
Copy link
Contributor

No description provided.

@shobhitupadhyayy shobhitupadhyayy requested a review from a team as a code owner January 20, 2026 12:39
@gitguardian
Copy link

gitguardian bot commented Jan 20, 2026

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Base automatically changed from dev to pre-stage January 22, 2026 09:23
Base automatically changed from pre-stage to main January 23, 2026 09:00
@umeshmore45 umeshmore45 requested a review from Copilot January 27, 2026 06:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds SSO/OAuth-based login support and a backend logout API, plus scripts/config to set up an OAuth app and integrate bearer-token authentication across multiple API calls.

Changes:

  • Add UI SSO login flow (app-config fetch + SSO status polling) and backend endpoints for app-config, OAuth callback, SSO status, and logout.
  • Add setup tooling (build script + migration utility) and introduce app/manifest JSON artifacts for OAuth configuration.
  • Update multiple backend services to support both Basic (authtoken) and SSO (Bearer access_token) authentication headers.

Reviewed changes

Copilot reviewed 28 out of 30 changed files in this pull request and generated 25 comments.

Show a summary per file
File Description
upload-api/src/config/index.ts Updates default CMS type and local path defaults.
ui/src/services/api/login.service.ts Adds API wrappers for app-config, SSO status, and logout.
ui/src/pages/Login/index.tsx Implements SSO login UX and polling-based completion flow.
ui/src/pages/Login/index.scss Adds SSO button styling and new utility-like classes.
ui/src/components/ProfileHeader/index.tsx Calls backend logout before clearing local storage; adds “Logging out…” UI state.
build.sh New interactive setup script for region selection, OAuth login, redirect_uri update, and migration run.
app.json New OAuth/app configuration file (currently committed).
api/sso.utils.js New migration utility to create/update app and generate app.json with OAuth/PKCE data.
api/src/utils/config-handler.util.ts New helpers to write BASIC/OAUTH auth settings into CLI config.
api/src/utils/auth.utils.ts Adds access-token getters and app.json-derived org/app config helpers.
api/src/services/user.service.ts Adds SSO-aware user profile fetching and org membership checks.
api/src/services/taxonomy.service.ts Switches request auth header to Bearer when access_token exists.
api/src/services/runCli.service.ts Switches CLI auth setup between BASIC and OAUTH based on stored tokens.
api/src/services/projects.service.ts Adds isSSO project flag and uses Bearer/authtoken accordingly in stack calls.
api/src/services/org.service.ts Adds Bearer/authtoken header selection for org/stack/locale endpoints.
api/src/services/migration.service.ts Adds Bearer/authtoken header selection for test stack create/delete.
api/src/services/marketplace.service.ts Updates app manifest creation logic to support Bearer token.
api/src/services/globalField.service.ts Updates global field requests to support Bearer token.
api/src/services/contentMapper.service.ts Updates content type requests to support Bearer token.
api/src/services/auth.service.ts Adds logout, OAuth callback token exchange, refresh token support, and SSO status logic.
api/src/routes/auth.routes.ts Exposes new routes for save-token, app-config, sso-status, and logout.
api/src/models/types.ts Extends JWT payload with is_sso and adds RefreshTokenResponse type.
api/src/models/authentication.ts Extends auth DB schema typing to include access_token.
api/src/controllers/auth.controller.ts Adds controllers for OAuth callback, app-config, SSO status, and logout.
api/src/constants/index.ts Adds token endpoint + regional host mappings for OAuth flows.
api/package.json Removes type: module; bumps axios; adds @types/express-session.
api/package-lock.json Locks axios bump and adds express-session types; large dependency churn.
api/manifest.json New app manifest containing OAuth client credentials (currently committed).
.talismanrc Adds new ignore entries (currently duplicated blocks).
.gitignore Adds app.json to ignores (but app.json is currently committed in this PR).
Files not reviewed (1)
  • api/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@umeshmore45 umeshmore45 changed the base branch from main to dev February 23, 2026 05:58
@umeshmore45 umeshmore45 marked this pull request as draft February 23, 2026 06:05
@shobhitupadhyayy shobhitupadhyayy marked this pull request as ready for review February 24, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant