Repository navigation
feat(auth): upgrade better auth to 1.7 - #1604
Merged
Merged
Conversation
Serve discovery against Better Auth's authorize endpoint directly instead of the /oauth/authorize wrapper, hash existing confidential client secrets and null empty public ones in the migration, and rely on live consent for revocation in the public API. Move MCP config into its own auth subpath and drop the unused verification repository.
…alid Better Auth 1.7 reuses a stored consent without re-prompting, so a failed workspace bind now revokes the grant instead of leaving an unbound consent. UNAUTHORIZED APIErrors from bearer verification now map to an invalid token (401) rather than escaping as a server error. Document the OIDC callback path move and the MCP_PUBLIC_URL / CHATBOTX_MCP_PUBLIC_URL pairing.
hello-jackytruong
referenced
this pull request
in hello-jackytruong/ChatWorkAI
Nov 22, 2026
* feat(auth): upgrade better auth to 1.7 * fix(auth): harden better auth 1.7 oauth migration and mcp flow Serve discovery against Better Auth's authorize endpoint directly instead of the /oauth/authorize wrapper, hash existing confidential client secrets and null empty public ones in the migration, and rely on live consent for revocation in the public API. Move MCP config into its own auth subpath and drop the unused verification repository. * fix(auth): revoke unbound mcp consent and treat expired tokens as invalid Better Auth 1.7 reuses a stored consent without re-prompting, so a failed workspace bind now revokes the grant instead of leaving an unbound consent. UNAUTHORIZED APIErrors from bearer verification now map to an invalid token (401) rather than escaping as a server error. Document the OIDC callback path move and the MCP_PUBLIC_URL / CHATBOTX_MCP_PUBLIC_URL pairing. * fix(auth): pass request context to oauth and mcp token verification * fix: migrate better-auth to 1.7.x
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.
Summary
Changes
Test plan