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

MAUI sample on Android crashes on login #132

Open
MaTToX3 opened this issue Aug 30, 2022 · 3 comments
Open

MAUI sample on Android crashes on login #132

MaTToX3 opened this issue Aug 30, 2022 · 3 comments

Comments

@MaTToX3
Copy link

MaTToX3 commented Aug 30, 2022

Getting the following error when trying to login with MAUI sample running on Android:

System.InvalidOperationException: 'You must subclass the WebAuthenticatorCallbackActivity and create an IntentFilter for it which matches your callbackUrl.'

image

It seems like something is still missing? That activity is implemented in Xamarin.Forms sample and it works, but here is missing, I believe on purpose? Has someone been able to login successfully on Android?

Thanks in advance.

@jrcpereira
Copy link
Contributor

You need to create a IntentFilter that responds to the callback url you define, which is specific per platform.

Check the Get Started on the Microsoft docs for Web Authenticator here: https://docs.microsoft.com/en-us/xamarin/essentials/web-authenticator

For MAUI, the instructions work for Android and iOS, but on UWP it's not working since it's still not yet supported: microsoft/WindowsAppSDK#441

@leastprivilege
Copy link
Contributor

I do not test against Android. Feel free to submit a PR if you have a solution.

@GioviQ
Copy link
Contributor

GioviQ commented Jan 10, 2023

In fact according to https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/communication/authentication?view=net-maui-6.0 the sample is not completed and with Windows will not work for a known issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants