feat: replace old auth service COMPASS-10817#8214
Draft
paula-stacho wants to merge 5 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Atlas auth/service configuration and sign-in flow in atlas-service, including new OIDC issuer/clientId defaults and adjustments to how user identity is derived after authentication.
Changes:
- Updates Atlas OIDC configuration defaults (clientId/issuer) and allows overriding the backend preset via an env var.
- Adjusts sign-in behavior and user info handling in the main-process auth service.
- Updates the sign-in success toast copy to no longer depend on user profile fields.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/atlas-service/src/util.ts | Updates default Atlas OIDC config and changes how the backend preset is selected (incl. env override). |
| packages/atlas-service/src/store/atlas-signin-reducer.ts | Changes the sign-in success toast title copy. |
| packages/atlas-service/src/main.ts | Modifies the OIDC plugin setup and sign-in flow, including user info derivation from the access token. |
Comment on lines
+360
to
370
| private static getUserInfoFromAccessToken( | ||
| accessToken: string | ||
| ): AtlasUserInfo { | ||
| const base64Url = accessToken.split('.')[1]; | ||
| const decodedToken = JSON.parse( | ||
| Buffer.from(base64Url, 'base64url').toString('utf8') | ||
| ); | ||
| return { | ||
| sub: decodedToken.sub, | ||
| }; | ||
| } |
paula-stacho
force-pushed
the
COMPASS-10817
branch
from
July 8, 2026 07:35
a352b5d to
d6b7c1f
Compare
paula-stacho
force-pushed
the
COMPASS-10817
branch
from
July 17, 2026 09:32
d6b7c1f to
a722af5
Compare
gribnoysup
reviewed
Jul 17, 2026
|
|
||
| const url = new URL(`${this.config.atlasLogin.issuer}/v1/revoke`); | ||
| url.searchParams.set('client_id', this.config.atlasLogin.clientId); | ||
| // TODO: check if we should use the discovery endpoint instead of hardcoding this |
Collaborator
There was a problem hiding this comment.
We should finally do this https://jira.mongodb.org/browse/COMPASS-7094 😓
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.
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes