From baac50f1baa332cf1b2f8ce7f85587fb6d30a849 Mon Sep 17 00:00:00 2001 From: Udhay-Adithya Date: Wed, 23 Jul 2025 13:31:43 +0530 Subject: [PATCH] fix: update OAuth2 grant handlers to use accessTokenUrl instead of authorizationUrl --- packages/better_networking/lib/utils/auth/oauth2_utils.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/better_networking/lib/utils/auth/oauth2_utils.dart b/packages/better_networking/lib/utils/auth/oauth2_utils.dart index 2582e0d8..d0370efb 100644 --- a/packages/better_networking/lib/utils/auth/oauth2_utils.dart +++ b/packages/better_networking/lib/utils/auth/oauth2_utils.dart @@ -104,7 +104,7 @@ Future oAuth2ClientCredentialsGrantHandler({ // Otherwise, perform the client credentials grant final client = await oauth2.clientCredentialsGrant( - Uri.parse(oauth2Model.authorizationUrl), + Uri.parse(oauth2Model.accessTokenUrl), oauth2Model.clientId, oauth2Model.clientSecret, scopes: oauth2Model.scope != null ? [oauth2Model.scope!] : null, @@ -157,7 +157,7 @@ Future oAuth2ResourceOwnerPasswordGrantHandler({ // Otherwise, perform the owner password grant final client = await oauth2.resourceOwnerPasswordGrant( - Uri.parse(oauth2Model.authorizationUrl), + Uri.parse(oauth2Model.accessTokenUrl), oauth2Model.username!, oauth2Model.password!, identifier: oauth2Model.clientId,