Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected app activation behaviour for WebAuthenticator when referencing NuGet package #96

Closed
hansmbakker opened this issue Jan 4, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@hansmbakker
Copy link

hansmbakker commented Jan 4, 2023

(moved from #92)

I'm using WinUIEx.WebAuthenticator.AuthenticateAsync(...).

Expected behaviour:
When opening the callback url, the app activation should be redirected to the original app instance based on the state that is given with the callback url.

Actual behaviour:
When using version 2.1 of WinUIEx (that is - using the NuGet package), a second app instance is still being opened instead of the redirect going to my initial instance. I am seeing that the state is encoded as JSON, which verifies that I'm using version 2.1 (the JSON encoding was new in #92).

When not using the NuGet package, but instead putting these files in my project:

  • WebAuthenticator.cs
  • WebAuthenticatorResult.cs
  • Helpers.cs
    the redirection works as expected.

This is probably a mistake on my side, but do you have any hints how I can best debug what is happening inside the NuGet package? It is not possible to put a breakpoint in decompiled code or in unloaded modules (and when the NuGet dll is loaded, the NuGet code is run immediately because of the [System.Runtime.CompilerServices.ModuleInitializer] attribute)

@hansmbakker
Copy link
Author

I created a bug repro in https://github.com/hansmbakker/WinUIExWebAuthenticatorBugRepro - hope it reproduces for you.

@hansmbakker
Copy link
Author

@dotMorten would you have time to look at my repro?

@Mat3oo
Copy link

Mat3oo commented Feb 20, 2023

I have the same problem on MAUI with nuget WinUIEx version 2.1.

@dotMorten dotMorten added the bug Something isn't working label Apr 13, 2023
dotMorten pushed a commit that referenced this issue Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants