mirror of
https://github.com/foss42/apidash.git
synced 2025-12-02 02:39:19 +08:00
fix: update OAuth2 grant handlers to use accessTokenUrl instead of authorizationUrl
This commit is contained in:
@@ -104,7 +104,7 @@ Future<oauth2.Client> oAuth2ClientCredentialsGrantHandler({
|
|||||||
|
|
||||||
// Otherwise, perform the client credentials grant
|
// Otherwise, perform the client credentials grant
|
||||||
final client = await oauth2.clientCredentialsGrant(
|
final client = await oauth2.clientCredentialsGrant(
|
||||||
Uri.parse(oauth2Model.authorizationUrl),
|
Uri.parse(oauth2Model.accessTokenUrl),
|
||||||
oauth2Model.clientId,
|
oauth2Model.clientId,
|
||||||
oauth2Model.clientSecret,
|
oauth2Model.clientSecret,
|
||||||
scopes: oauth2Model.scope != null ? [oauth2Model.scope!] : null,
|
scopes: oauth2Model.scope != null ? [oauth2Model.scope!] : null,
|
||||||
@@ -157,7 +157,7 @@ Future<oauth2.Client> oAuth2ResourceOwnerPasswordGrantHandler({
|
|||||||
|
|
||||||
// Otherwise, perform the owner password grant
|
// Otherwise, perform the owner password grant
|
||||||
final client = await oauth2.resourceOwnerPasswordGrant(
|
final client = await oauth2.resourceOwnerPasswordGrant(
|
||||||
Uri.parse(oauth2Model.authorizationUrl),
|
Uri.parse(oauth2Model.accessTokenUrl),
|
||||||
oauth2Model.username!,
|
oauth2Model.username!,
|
||||||
oauth2Model.password!,
|
oauth2Model.password!,
|
||||||
identifier: oauth2Model.clientId,
|
identifier: oauth2Model.clientId,
|
||||||
|
|||||||
Reference in New Issue
Block a user