Repository navigation
feat: implement button "login with SSO" - #4242
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1542910950
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| export function createSsoAuthorizeUrl(host: string, returnTo: string) { | ||
| const url = new URL('/meta/oidc/authorize', `https://${host}`); |
There was a problem hiding this comment.
Build the authorize URL from the configured meta backend
In the documented multi-cluster setup where REACT_APP_META_BACKEND can be a different URL such as http://your-meta-host:8765, BaseMetaAPI fetches capabilities from that configured backend, but this line redirects to https://<current UI host>/meta/oidc/authorize. The SSO button consequently targets the wrong host and protocol; derive the authorize endpoint from the configured meta-backend base while preserving its scheme and path prefix.
AGENTS.md reference: AGENTS.md:L489-L493
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
The current URL is intentional and follows #257: the UI and YDB Meta are expected to use the same host.
Using REACT_APP_META_BACKEND is not enough for a separate or prefixed backend. After SSO, the browser returns to /meta/oidc/callback, where the session cookie is created. If Meta uses another host, the cookie will belong to that host rather than the UI host.
Supporting a separate Meta host or /api/meta3 requires additional proxy/backend integration, so it is outside the scope of this change.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d116e071f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| &__button-sso { | ||
| margin-top: 8px; |
| const isDirectAuthPage = Boolean(useRouteMatch({path: routes.auth, exact: true})); | ||
|
|
||
| const needDatabase = useLoginWithDatabase(); | ||
| useMetaCapabilitiesQuery(); |
There was a problem hiding this comment.
Let's better wrap Authentication with GetMetaCapabilities (see src/containers/App/Content)
Resolves #247
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Test Changes Summary ✨1 🗑️18
✨ New Tests (1)
🗑️ Deleted Tests (18)
Bundle Size: 🔺
Current: 65.46 MB | Main: 65.46 MB
Diff: +6.14 KB (0.01%)
ℹ️ CI Information