feat: add OAuth2 server settings card and update SDK #3067
Open
HarshMN2345 wants to merge 6 commits into
Open
Conversation
Contributor
Greptile SummaryThis PR adds a new OAuth2 authorization server settings card to the project settings page, allowing users to configure their project as an OAuth2 provider with a consent URL, scopes, per-client token durations, and PKCE enforcement.
Confidence Score: 5/5Safe to merge; all previously flagged issues have been resolved and the implementation follows established codebase patterns. The new settings card correctly initialises form state from the project store, uses deepEqual to gate the Update button, sends scopes as a plain array, uses a generic success message, and applies min=1 guards to all four duration inputs. No files require special attention. Important Files Changed
Reviews (5): Last reviewed commit: "feat: add OAuth2 server settings card" | Re-trigger Greptile |
- New updateOAuth2Server.svelte card in project settings for configuring the project as an OAuth2 authorization server (enabled toggle, authorization URL, scopes, per-client-type token durations, PKCE enforcement) - Add ProjectUpdateOAuth2Server analytics event - Fix enum renames introduced by SDK bump: Status→ProjectStatus, StatusCode→RedirectStatusCode, Adapter→SiteAdapter, BuildRuntime→SiteBuildRuntime, Framework→SiteFramework, Runtime→FunctionRuntime, Scopes→ProjectKeyScopes, Addon→OrganizationAddon
The new SDK renamed top-level enums (Status→ProjectStatus, StatusCode→RedirectStatusCode, Adapter→SiteAdapter, etc.) but kept Models.* names unchanged (Models.Framework, Models.Runtime). Also removed Scopes in favour of ProjectKeyScopes. - Models.SiteFramework → Models.Framework - Models.FunctionRuntime → Models.Runtime - VCSDetectionType.SiteFramework → VCSDetectionType.Framework - VCSDetectionType.FunctionRuntime → VCSDetectionType.Runtime - Scopes → ProjectKeyScopes in function files (enum removed from SDK) - Fix updateScopes.svelte: restore Scopes component import, remove duplicate type alias
- New updateOAuth2Server.svelte card in project settings
- Enable/disable toggle, authorization URL, scopes, per-client token
durations with unit selectors, PKCE enforcement
- min={1} on all duration inputs, scopes sent directly to allow clearing
- Add ProjectUpdateOAuth2Server analytics event
Note: awaiting SDK with updateOAuth2Server method and correct enum names
3368ff9 to
21aefc0
Compare
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.
What does this PR do?
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)