Xero-NetStandard icon indicating copy to clipboard operation
Xero-NetStandard copied to clipboard

CreateAuthorizeUrl Method Not Found

Open SimonEvans482 opened this issue 1 year ago • 10 comments

SDK you're using (please complete the following information):

  • Version: Xero.NetStandard.OAuth2 - 9.2.0. Xero.NetStandard.OAuth2Client - 1.6.0 IdentityModel - 7.0.0

Describe the bug When attempting to authorise via Pkce, I am getting an exception on client.BuildLoginUriPkce(codeverifier), in:

    Public Function GetLoginURI() As String
        codeverifier = GetRandomString()
        Return client.BuildLoginUriPkce(codeverifier)
    End Function

Exception Text:

System.MissingMethodException: 'Method not found: 'System.String IdentityModel.Client.RequestUrlExtensions.CreateAuthorizeUrl(IdentityModel.Client.RequestUrl, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.Nullable1<Int32>, System.String, System.String, IdentityModel.Client.Parameters)'.'`

To Reproduce Steps to reproduce the behavior:

  1. Initiate an instance of XeroClient with XeroConfiguration
  2. generate a codeverifier string
  3. call client.BuildLoginUriPkce(codeverifier)

Expected behavior Pkce auth flow to run without exception

Screenshots I don't think necessary

Additional context Have been using the SDK for a number of years without issue. May have recently updated NuGet package to latest version. This may be a reoccurrence of ticket https://github.com/XeroAPI/Xero-NetStandard/issues/384

SimonEvans482 avatar Nov 11 '24 11:11 SimonEvans482

PETOSS-672

github-actions[bot] avatar Nov 11 '24 11:11 github-actions[bot]

Thanks for raising an issue, a ticket has been created to track your request

github-actions[bot] avatar Nov 11 '24 11:11 github-actions[bot]

downgrading IdentityModel to 6.2.0 does resolve the issue, so presume version 7.0.0 support just needs to be added...

SimonEvans482 avatar Nov 11 '24 12:11 SimonEvans482

This is the same as issue: https://github.com/XeroAPI/Xero-NetStandard/issues/554

ReviveDigitalTeam avatar Nov 22 '24 00:11 ReviveDigitalTeam

Is there any news on whether this problem will be fixed?

itlpierre avatar Feb 02 '25 01:02 itlpierre

Issue appears to be with Xero.NetStandard.OAuth2.Client. According to #520 a fixed was pushed to version 9.2 of Xero.NetStandard.OAuth2 but the issue was closed without addressing Xero.NetStandard.OAuth2.Client

itlpierre avatar Feb 02 '25 01:02 itlpierre

Did this get resolved? I have the same issue when trying to add new Xero tennants: "Method not found: 'System.String IdentityModel.Client.RequestUrlExtensions.CreateAuthorizeUrl"

Version: Xero.NetStandard.OAuth2 - 9.2.0. Xero.NetStandard.OAuth2Client - 1.6.0 IdentityModel - 7.0.0

slykiwi avatar Apr 21 '25 23:04 slykiwi

Did this get resolved? I have the same issue when trying to add new Xero tennants: "Method not found: 'System.String IdentityModel.Client.RequestUrlExtensions.CreateAuthorizeUrl"

Version: Xero.NetStandard.OAuth2 - 9.2.0. Xero.NetStandard.OAuth2Client - 1.6.0 IdentityModel - 7.0.0

The latest commit to Xero.NetStandard.OAuth2Client on the main branch did in fact fix the issue, but the nuget package was not updated to match the latest commit. If you clone the repo and manually reference it in your project it will work (i tried it myself).

itlpierre avatar Apr 22 '25 02:04 itlpierre

Can we release a new version with this fix please.

rogerfar avatar May 20 '25 19:05 rogerfar

Can we release a new version with this fix please.

im not hopeful that theyll do it because the last time Xero.NetStandard.OAuth2.Client nuget pacakge was updated was 2022. But i really hope they do because its not very efficient to have to clone the whole repo just to get it to work on IdentityModel version 7

itlpierre avatar May 22 '25 03:05 itlpierre