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

WebAuthenticator Opens Second Instance of App (MAUI) #111

Closed
zizusoft opened this issue Mar 5, 2023 · 5 comments
Closed

WebAuthenticator Opens Second Instance of App (MAUI) #111

zizusoft opened this issue Mar 5, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@zizusoft
Copy link

zizusoft commented Mar 5, 2023

In lieu of the MAUI WebAuthenticator issue (dotnet/maui#2702)

I am trying to use this for my MAUI project with Windows.

image

It launches the web browser for authentication just fine - the only issue is that once I complete authentication, the web browser prompts me to relaunch my app - and creates a second instance of the App rather than returning to the original one that opened the browser.

image

image

Have I missed something in the setup?

Thanks

@dotMorten
Copy link
Owner

App activation works by starting a new instance. WinUiEx should detect it’s meant for an existing instance and redirect the activation to that app and shut the new instance down. If that doesn’t happen it’s likely your oauth service is munging the state parameter that contains the information about your existing instance that the activation is meant for

@zizusoft
Copy link
Author

zizusoft commented Mar 6, 2023

Thanks for getting back to me so quickly.

I'm using Microsoft Azure's OAUTH 2 SSO....

I thought it best to try with your sample / example for MAUI just to prove it is an issue with Microsoft, and not WinUIEx / my setup.

Have the credentials changed from your sample, as If I used the supplied email and password, I get red outlines on the sign in box which I assume means the password is wrong?

image

Thanks

@zizusoft
Copy link
Author

zizusoft commented Mar 6, 2023

Hi @dotMorten,

I've just noticed that this looks like the same issue as #96 ?

@droll2571
Copy link

@zizusoft,

I was experiencing the same issue in my dotnet MAUI application until I set the window's persistence ID.

image

@dotMorten
Copy link
Owner

That’s really odd. The persistence has nothing to do with auth

@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