You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(auth)!: decode omitted OAuthClient fields and drop the unused scope - #1957
Aligns OAuthClient and the OAuth client options with what Auth actually returns and accepts.
OAuthClient.tokenEndpointAuthenticationMethod and OAuthClient.registrationType are nullable. Auth marks token_endpoint_auth_method and registration_type as omitempty in OAuthServerClientResponse, but they were decoded as required, so a response without them would throw.
OAuthClient.scope is removed. OAuthServerClientResponse has no scope field, so it was always null.
CreateOAuthClientOptions.scope and UpdateOAuthClientOptions.scope are removed. Neither OAuthServerClientRegisterParams nor OAuthServerClientUpdateParams reads a scope key, so Auth ignored it. Scopes are requested per authorization through the scope query parameter on /oauth/authorize.
The OAuth integration tests passed scope: 'email' when creating clients and asserted that the authorization details echoed it back. That only held because the server's default scope is email. The test fixture now sends scope=email on the authorize request instead.
MIGRATION.md has a section for each break.
Linear: SDK-2160
Summary by CodeRabbit
Documentation
Clarified that OAuth client authentication method and registration type may be absent.
Documented that scopes are set on authorization requests and returned with authorization details.
Bug Fixes
OAuth client details now handle missing authentication method and registration type values.
API Changes
Removed scope from OAuth client models and client creation and update options.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
📝 Walkthrough
OAuth client models now treat authentication metadata as nullable and no longer include client-level scope. Tests, SDK compliance entries, and the migration guide reflect these changes. OAuth API tests place requested scope on the authorization request.
OAuthClient.tokenEndpointAuthenticationMethod and registrationType are nullable. scope is removed from OAuth client models and create/update options, including JSON serialization. Tests and SDK compliance entries reflect the updated contract.
Place scope on authorization requests packages/supabase_auth/test/src/auth_oauth_api_test.dart, MIGRATION.md
OAuth API tests provide scope on the authorization request and check the returned authorization scope. The migration guide documents the nullable fields, scope removal, and authorization-scope locations.
OAuth client metadata can be omitted, and requested scopes are supplied on authorization requests. The breaking model changes are documented, and no material merge risk is apparent.
Pre-merge checks: 5
Passed checks: 5 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly summarizes both main changes: decoding omitted OAuthClient fields and removing the unused scope.
Docstring Coverage
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
spydon
deleted the
lukasklingsbo/sdk-2160-fixauth-decode-omitted-oauthclient-fields-and-drop-the
branch
October 15, 2026 09:25
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
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.
Aligns
OAuthClientand the OAuth client options with what Auth actually returns and accepts.OAuthClient.tokenEndpointAuthenticationMethodandOAuthClient.registrationTypeare nullable. Auth markstoken_endpoint_auth_methodandregistration_typeasomitemptyinOAuthServerClientResponse, but they were decoded as required, so a response without them would throw.OAuthClient.scopeis removed.OAuthServerClientResponsehas noscopefield, so it was alwaysnull.CreateOAuthClientOptions.scopeandUpdateOAuthClientOptions.scopeare removed. NeitherOAuthServerClientRegisterParamsnorOAuthServerClientUpdateParamsreads ascopekey, so Auth ignored it. Scopes are requested per authorization through thescopequery parameter on/oauth/authorize.The OAuth integration tests passed
scope: 'email'when creating clients and asserted that the authorization details echoed it back. That only held because the server's default scope isemail. The test fixture now sendsscope=emailon the authorize request instead.MIGRATION.mdhas a section for each break.Linear: SDK-2160
Summary by CodeRabbit
scopefrom OAuth client models and client creation and update options.