Skip to content

OAuth provider client and dashboard #792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open
4 changes: 4 additions & 0 deletions apps/backend/src/app/api/latest/oauth-providers/crud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export const oauthProviderCrudHandlers = createLazyProxy(() => createCrudHandler
user_id: params.user_id,
id: oauthAccount.id,
email: oauthAccount.email || undefined,
provider_config_id: oauthAccount.configOAuthProviderId,
type: providerConfig.type as any, // Type assertion to match schema
allow_sign_in: oauthAccount.allowSignIn,
allow_connected_accounts: oauthAccount.allowConnectedAccounts,
Expand Down Expand Up @@ -193,6 +194,7 @@ export const oauthProviderCrudHandlers = createLazyProxy(() => createCrudHandler
user_id: oauthAccount.projectUserId || throwErr("OAuth account has no project user ID"),
id: oauthAccount.id,
email: oauthAccount.email || undefined,
provider_config_id: oauthAccount.configOAuthProviderId,
type: providerConfig.type as any, // Type assertion to match schema
allow_sign_in: oauthAccount.allowSignIn,
allow_connected_accounts: oauthAccount.allowConnectedAccounts,
Expand Down Expand Up @@ -303,6 +305,7 @@ export const oauthProviderCrudHandlers = createLazyProxy(() => createCrudHandler
user_id: params.user_id,
id: params.provider_id,
email: data.email ?? existingOAuthAccount.email ?? undefined,
provider_config_id: existingOAuthAccount.configOAuthProviderId,
type: providerConfig.type as any,
allow_sign_in: data.allow_sign_in ?? existingOAuthAccount.allowSignIn,
allow_connected_accounts: data.allow_connected_accounts ?? existingOAuthAccount.allowConnectedAccounts,
Expand Down Expand Up @@ -398,6 +401,7 @@ export const oauthProviderCrudHandlers = createLazyProxy(() => createCrudHandler
user_id: data.user_id,
email: data.email,
id: created.id,
provider_config_id: data.provider_config_id,
type: providerConfig.type as any,
allow_sign_in: data.allow_sign_in,
allow_connected_accounts: data.allow_connected_accounts,
Expand Down
Loading