Skip to content

Comments

chore: update @better-auth/sso and better-auth to version 1.5.0-beta.…#3783

Open
Siumauricio wants to merge 27 commits intocanaryfrom
feat/add-support-for-trusted-providers
Open

chore: update @better-auth/sso and better-auth to version 1.5.0-beta.…#3783
Siumauricio wants to merge 27 commits intocanaryfrom
feat/add-support-for-trusted-providers

Conversation

@Siumauricio
Copy link
Contributor

@Siumauricio Siumauricio commented Feb 23, 2026

…16; rename session_temp table to session and adjust related constraints; add new SQL migration for session table; implement getTrustedProviders function for dynamic provider retrieval

What is this PR about?

Please describe in a short paragraph what this PR is about.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

Screenshots (if applicable)

Greptile Summary

This PR updates @better-auth/sso and better-auth from version 1.4.18 to 1.5.0-beta.16, and includes several related changes to align with the new version:

  • Renamed session_temp table to session via database migration
  • Changed trustedProviders from static environment variable to dynamic database lookup via new getTrustedProviders() function
  • Modified validateRequest logic to conditionally filter by activeOrganizationId and fall back to default organization when not set

Key changes:

  • Database migration renames session table and updates constraints
  • Dynamic SSO provider retrieval from database replaces static env var configuration
  • Session validation now handles missing activeOrganizationId by selecting user's default/newest organization

Confidence Score: 3/5

  • This PR has moderate risk due to session validation logic changes
  • The dependency upgrade and table rename appear safe, but the modified validateRequest logic has a potential issue where activeOrganizationId is unconditionally overwritten even when member is null, which could cause session state inconsistencies
  • Pay close attention to packages/server/src/lib/auth.ts - the session validation logic change needs verification

Last reviewed commit: 6cc646c

Siumauricio and others added 3 commits February 23, 2026 01:58
…16; rename session_temp table to session and adjust related constraints; add new SQL migration for session table; implement getTrustedProviders function for dynamic provider retrieval
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

member?.user.enableEnterpriseFeatures || false;
session.user.isValidEnterpriseLicense =
member?.user.isValidEnterpriseLicense || false;
session.session.activeOrganizationId = member?.organization.id || "";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setting activeOrganizationId after retrieving the member creates inconsistency. The query searches for a member using session.session.activeOrganizationId (if present), but then unconditionally overwrites it with member?.organization.id || "". If member is null, this sets activeOrganizationId to an empty string, which could cause issues on subsequent requests.

Siumauricio and others added 24 commits February 23, 2026 02:06
…uding hono, ai-sdk packages, and react-hook-form
…ema resolver; update dependencies in pnpm-lock.yaml
…ing zod to version 4.3.6, @dokploy/trpc-openapi to version 0.0.13, and @trpc packages to version 11.10.0; refactor loading state handling in application components
…react to version 5.31.2; refactor OpenAPI document handling in swagger.tsx and settings.ts for improved compatibility and clarity
…lock.yaml; refactor schema definitions for improved clarity and consistency across various database schemas
…o use undefined instead of null for improved consistency; enhance error handling in AI component
…e consistency and clarity across create, update, and remove operations
…moving transformer to the main return object for improved clarity
…proved consistency across API routes and schemas
… in package.json files and update pnpm-workspace.yaml for shared dependency management
…iles and remove catalog reference for improved dependency management
…ase type for improved clarity and consistency
… export the connection for consistent usage across the application
…prevent redeclaration issues in monorepos and improve connection management in development and production environments
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