auth0 / auth0-oidc-client-net

OIDC Client for .NET Desktop and Mobile applications
https://auth0.github.io/auth0-oidc-client-net/
Apache License 2.0
86 stars 49 forks source link

Bump OidcClient to v5 and support scope with RefreshTokens #248

Closed frederikprijck closed 1 year ago

frederikprijck commented 1 year ago

Changes

Bumps OidcClient to v5 to ensure we can use Access Token Descoping when issuing Refresh Tokens.

References

241

Testing

Still needs to be properly tested.

Checklist

saamerm commented 1 year ago

@frederikprijck thank you for this work, i am facing this issue preventing me from releasing. It seems like you need to mark your PR as ready for review :

image
frederikprijck commented 1 year ago

Hey @saamerm , Not sure what you mean about being prevented to release, can you elaborate?

Regardless, this pr is marked as Draft because it shouldnt be merged yet. It still needs a good round of functional testing to determine this can go in without a breaking change.

However, i have been distracted with other priorities and will see when i can find some time.

saamerm commented 1 year ago

@frederikprijck I get this error right now, that i m think might be solvable using some sort of linker exception

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(649,5): error XALNK7000: Mono.Linker.MarkException: 
Error processing method: 'System.Void Auth0.OidcClient.Auth0ClientBase/<RefreshTokenAsync>d__12::MoveNext()' in assembly: 'Auth0.OidcClient.Core.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Threading.Tasks.Task`1<IdentityModel.OidcClient.Results.RefreshTokenResult> IdentityModel.OidcClient.OidcClient::RefreshTokenAsync(System.String,IdentityModel.Client.Parameters,System.Threading.CancellationToken)
at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod (Mono.Cecil.MethodReference reference) [0x00013] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00049] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00040] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x000c2] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x001b1] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x0001b] in <68c6268fbc45467eab046a8db2d5d932>:0 
 --- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00047] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue () [0x0000a] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Steps.MarkStep.Process () [0x000f6] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000d] in <68c6268fbc45467eab046a8db2d5d932>:0 
at MonoDroid.Tuner.MonoDroidMarkStep.Process (Mono.Linker.LinkContext context) [0x0000b] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Pipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x0000d] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x0000f] in <68c6268fbc45467eab046a8db2d5d932>:0 
at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in <68c6268fbc45467eab046a8db2d5d932>:0 
at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.ILogger logger, Mono.Linker.LinkContext& context) [0x00071] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x0018f] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Xamarin.Android.Tasks.LinkAssemblies.RunTask () [0x0001b] in <68c6268fbc45467eab046a8db2d5d932>:0 
at Microsoft.Android.Build.Tasks.AndroidTask.Execute () [0x00000] in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:17 

You might be able to add this attribute to prevent this https://learn.microsoft.com/en-us/xamarin/android/deploy-test/linker#preserving-code

frederikprijck commented 1 year ago

Not sure how this relates to this PR. Please open an issue with something for us to reproduce if you believe this is an issue with our SDK, let's not communicate through this draft PR.

frederikprijck commented 1 year ago

Closing in favor of #254