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
81 stars 47 forks source link

browser window open after login #323

Open figuerres opened 4 months ago

figuerres commented 4 months ago

Checklist

Description

i have a new dot net maui application using dot net v 8 i have working login and logout and token management that work as expected so far on both windows and android devices.

i do seem to have two bugs one is that the browser tab / window is not closed after login both on windows and an android.

a second item is that when i try to use the android emulator on windows the login crashes the emulator and i have no idea why or how to fix that.

also debug on my actual phone also breaks , but i can run the phone app w/o debug fine. with debug no joy.

Reproduction

use this sample from the aut0 blog https://auth0.com/blog/call-protected-api-from-dotnet-maui-application/

setup the maui app and run it.

see that the login browser window stays open.

Additional context

No response

auth0-oidc-client-net version

1

.NET version

8.x

Platform

Android, Windows

Platform version(s)

windos 11, android 34

frederikprijck commented 4 months ago

Thanks for reaching out.

The browser staying open on windows is a known thing, we can't realy control the process to close it. This might one day be resolved once Microsoft adds support for Windows for their WebAuthenticator, but it's not uncommon on Windows platforms for browsers to not auto-close due to the lack of control.

More info on that lack-of-support for Windows in the MAUI Web Authenticator:

Regarding Android, we'll need to look into this.