Skip to content

feat: add OAuth2 server settings card and update SDK #3067

Open
HarshMN2345 wants to merge 6 commits into
mainfrom
feat-oauth2server-settings
Open

feat: add OAuth2 server settings card and update SDK #3067
HarshMN2345 wants to merge 6 commits into
mainfrom
feat-oauth2server-settings

Conversation

@HarshMN2345
Copy link
Copy Markdown
Member

  • 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

What does this PR do?

image image

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.)

@HarshMN2345 HarshMN2345 changed the title feat: add OAuth2 server settings card and update SDK to 81a4f24 feat: add OAuth2 server settings card and update SDK May 28, 2026
@HarshMN2345 HarshMN2345 requested a review from Meldiron May 28, 2026 14:16
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 28, 2026

Greptile Summary

This 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.

  • updateOAuth2Server.svelte introduces the full settings form with Svelte 5 reactivity, unit-aware duration fields (seconds/minutes/hours/days), and proper deep-equality change detection to gate the Update button.
  • analytics.ts adds the ProjectUpdateOAuth2Server submit event.
  • +page.svelte mounts the new card between UpdateProtocols and UpdateServices.

Confidence Score: 5/5

Safe 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

Filename Overview
src/routes/(console)/project-[region]-[project]/settings/updateOAuth2Server.svelte New settings card for OAuth2 authorization server configuration; all four previously flagged issues (success message, min guards, scopes array) have been fixed; one minor URL validation gap remains
src/lib/actions/analytics.ts Adds ProjectUpdateOAuth2Server enum entry to the Submit analytics event list; straightforward addition in alphabetical order
src/routes/(console)/project-[region]-[project]/settings/+page.svelte Imports and mounts the new UpdateOAuth2Server card between UpdateProtocols and UpdateServices; no logic changes

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
@HarshMN2345 HarshMN2345 force-pushed the feat-oauth2server-settings branch from 3368ff9 to 21aefc0 Compare May 29, 2026 11:54
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