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

WebAuthenticationProvider not opening the browser #19577

Open
ibb2 opened this issue Feb 23, 2025 · 1 comment
Open

WebAuthenticationProvider not opening the browser #19577

ibb2 opened this issue Feb 23, 2025 · 1 comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working

Comments

@ibb2
Copy link

ibb2 commented Feb 23, 2025

Current behavior

Upon creating a new project and selecting web authentication, clicking the login button does nothing. Even after setting the LoginStartUri for the WebAuthentication property?(not sure what this is called) in appsetting.development.json to the correct oauth url.

I am trying to use Google Oauth 2, I have made a desktop client along with setting up the rest of the authentication in the Google API Console. This is how my LoginStartUri looks:
"LoginStartUri": "https://accounts.google.com/o/oauth2/v2/auth?client_id=1075413216201-njiem6pnakgejlp7ducmimdue9mavu2c.apps.googleusercontent.com&redirect_uri=myprotocol:/authentication-callback&response_type=code&scope=https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email&access_type=offline",

Expected behavior

I expect that clicking the login button would open the web browser so that the oauth login flow could begin.

How to reproduce it (as minimally and precisely as possible)

Create a new project leaving everything as default expect for authentication which is set to web.

min.zip

Workaround

The LoginStartUri works using Launcher.LaunchUriAsync(uri), except for the callback. But this means handling everything manually instead of utilizing the authentication provided by platform uno.

Works on UWP/WinUI

No

Environment

No response

NuGet package version(s)

No response

Affected platforms

iOS, Skia (macOS), Windows (WinAppSDK)

IDE

Rider macOS, Visual Studio 2022

IDE version

Rider: Build #RD-243.24978.27, built on February 7, 2025. Visual Studio: Version 17.13.1

Relevant plugins

No response

Anything else we need to know?

No response

@ibb2 ibb2 added difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification labels Feb 23, 2025
@jeromelaban jeromelaban removed the triage/untriaged Indicates an issue requires triaging or verification label Feb 24, 2025
@ibb2
Copy link
Author

ibb2 commented Feb 28, 2025

OK so I tried to testing different target on different platform on my Macbook and Windows PC. I found that the only way the web authentication worked was if I used the packaged version on windows or web assembly. IOS, Android, Mac Catalyst, Desktop (Mac, Windows, and Linux) and Windows Unpackaged the login button did not work. This was for both the .NET 8 and .NET 9 runtime.

Not really sure what I am missing or if this expected behavior? Is this working for other people or am i just setting it up wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants