Acquire UserCredential object with C# running on Android (AvaloniaUI) #2585
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: question
Request for information or clarification. Not an issue.
Hi there
I am writing an C# application, using AvaloniaUI, that will target Android and Desktop (initially). These applications need to communicate with a C# WebAPI and should only be accessible inside of my Google Organization.
When the apllication is deployed as a desktop app I am able to use GoogleWebAuthorizationBroker.AuthorizeAsync to obtain a UserCredential object for use to make requests to my WebAPI.
The same code does not run when I am running the Android App. I get a platform unsupported exception. Avalonia is not explicitly mentioned in the Unsupported Frameworks but I assume it's because of the cross platform and needing access to a browser that it does not know how to interact with.
My question is, is there a recommended approach using a C# library to obtain a similar object to the UserCredential object obtainable by GoogleWebAuthorizationBroker.AuthorizeAsyn?
If not, is there any method of obtaining the necessary token using some sort of OAthu2 SSO approach when running C# on Android?
Currently this is a .net7 project but I can change this to .net8 preview if that will make a difference.
I was hoping issue 2561 would help solve this issue but it looks like that is not the case. I did ask a question on that issue but it sounds like that won't add support for what I am trying to accomplish.
The text was updated successfully, but these errors were encountered: