You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(auth): configure Okta/OIDC scopes without changing defaults - #1551
Blocked by upstream architecture change (2026-11-13). After this PR was opened, #1530 removed server/ and its tests from this public repository, replacing local server builds with published backend images. This branch still changes server/src/config.ts, server/src/auth/index.ts and server/tests/config.test.ts, which no longer exist on main. GitHub therefore reports merge conflicts. Do not resolve this by restoring the removed backend files: that would not modify the backend images used at runtime.
Maintainers: please port the OKTA_OAUTH_SCOPES parsing and the okta({ scopes }) pass-through into the backend's current source/build pipeline (or identify the appropriate contribution repository). Retain the default openid profile email when unset, reject a configured list without openid, and run the backend's config/auth tests plus an OIDC flow against an openid-only provider. The six-file patch here remains a reference implementation, not a merge-ready patch. The external-contributor CI run returned action_required with no jobs; no tests passed in CI.
Context
Addresses #1549: OpenBot's startup-configured Okta/OIDC provider always requested the default openid profile email scopes, rejecting providers that only support openid.
Changes
Add optional OKTA_OAUTH_SCOPES, accepting comma- or whitespace-separated values; reject configurations without openid.
Pass configured scopes to better-auth's okta() helper while preserving its existing defaults when unset.
Add focused config regression tests for defaults, openid-only, separators/deduplication, invalid scopes and missing credentials.
Document the optional setting in README, docs/configuration.md, and .env.example.
Verification
Reviewed existing config and auth source; confirmed no scopes were previously passed to okta().
Ran 6 isolated Node.js assertions for the new scope parsing semantics: passed.
Not yet run: repository bun test / TypeScript typecheck / CI because the full checkout and its dependencies are unavailable in this execution environment. Please keep this PR as a draft pending CI and integration tests. No claim of a production-verified OIDC flow.
AI-assisted change, reviewed against the current fork source.
Verified blocker for #1551: Upstream #1530 (merged 2026-11-13, commit f71b0f4) deleted server/ from the public repository and switched runtime/backend builds to published images. The PR is now 63 commits behind main, and GitHub reports mergeable_state: dirty. This is not a routine rebase: restoring the removed server source would create dead code rather than fix the shipped backend.
I have marked the PR description as blocked and kept it as a draft. The implementation in this PR can be ported to the backend image source: parse an optional OKTA_OAUTH_SCOPES (comma/space-separated, must include openid) and forward scopes to okta(), preserving defaults when absent. We need a backend-source location and CI/OIDC integration verification before it can be merged.
The upstream CI run is action_required with no jobs executed; this is not evidence of a failing unit test.
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
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.
Important
Blocked by upstream architecture change (2026-11-13). After this PR was opened, #1530 removed
server/and its tests from this public repository, replacing local server builds with published backend images. This branch still changesserver/src/config.ts,server/src/auth/index.tsandserver/tests/config.test.ts, which no longer exist onmain. GitHub therefore reports merge conflicts. Do not resolve this by restoring the removed backend files: that would not modify the backend images used at runtime.Maintainers: please port the
OKTA_OAUTH_SCOPESparsing and theokta({ scopes })pass-through into the backend's current source/build pipeline (or identify the appropriate contribution repository). Retain the defaultopenid profile emailwhen unset, reject a configured list withoutopenid, and run the backend's config/auth tests plus an OIDC flow against anopenid-only provider. The six-file patch here remains a reference implementation, not a merge-ready patch. The external-contributor CI run returnedaction_requiredwith no jobs; no tests passed in CI.Context
Addresses #1549: OpenBot's startup-configured Okta/OIDC provider always requested the default
openid profile emailscopes, rejecting providers that only supportopenid.Changes
OKTA_OAUTH_SCOPES, accepting comma- or whitespace-separated values; reject configurations withoutopenid.okta()helper while preserving its existing defaults when unset.Verification
okta().bun test/ TypeScript typecheck / CI because the full checkout and its dependencies are unavailable in this execution environment. Please keep this PR as a draft pending CI and integration tests. No claim of a production-verified OIDC flow.AI-assisted change, reviewed against the current fork source.