ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Use OAuthAuthorityUrl Parameter in OAuth2Impl.AcquireTokenByAuthorizationCodeWithCredentials or give us an event to use it

Open BenjaminHochstetterBiz opened this issue 1 year ago • 3 comments

Why do you need this change?

Hello,

Then we can use the implementation with other oAuth provider.

Describe the request

Please Add TockenUrl as Parameter Parameter in OAuth2Impl.AcquireTokenByAuthorizationCodeWithCredentials or give us an event to use it.

procedure AcquireTokenByAuthorizationCodeWithCredentials(AuthorizationCode: Text; ClientId: Text; ClientSecret: SecretText; RedirectUrl: Text; TockenUrl : Text; Scopes: List of [Text]; var AccessToken: SecretText) var ScopesArray: DotNet StringArray; begin FillScopesArray(Scopes, ScopesArray); OnBeforeALAcquireTokenByAuthorizationCodeWithCredentials(AuthorizationCode; ClientId; ClientSecret; RedirectUrlt; OAuthAuthorityUrl; Scopes; var AccessToken, handled);

    if not handled then
       AccessToken := AuthFlow.ALAcquireTokenByAuthorizationCodeWithCredentials(AuthorizationCode, ClientId, ClientSecret, ScopesArray);
end;

Internal work item: AB#610223

BenjaminHochstetterBiz avatar Oct 14 '25 06:10 BenjaminHochstetterBiz

Hi @BenjaminHochstetterBiz,

The tokenUrl you're requesting, that's the authority url am I correct? If so, why not use one of the other existing apis? For example, AcquireTokensAndTokenCacheByAuthorizationCode? That takes in similar parameters and retrieves the auth code in the same flow.

darjoo avatar Oct 17 '25 06:10 darjoo

I Use oAuth2 from a third party solution. I have to use ".../oauth/authorize" for the AuthorizationCode and ".../oauth/token" to receive the tocken

I tried to use the function "AcquireTokensAndTokenCacheByAuthorizationCode" with a "OAuthAuthorityUrl" = ".../oauth/authorize".

That works for receiving the AuthCode, but not for the Token. There is no parameter for the tokenUrl.

Image

"AcquireTokensAndTokenCacheByAuthorizationCode" is using "AcquireTokensAndTokenCacheByAuthorizationCodeWithCredentials"

Image

BenjaminHochstetterBiz avatar Oct 17 '25 12:10 BenjaminHochstetterBiz

This one seems stranded. The internal work item still exists. I have updated it and we will still be looking into this extensibility request. As this repo is getting archived today, I am closing this issue on GitHub. The issue only remains active internally.

JesperSchulz avatar Oct 19 '26 13:10 JesperSchulz