WebAuthenticator doesn't support Azure App Service callback response.
See original GitHub issueDescription
I would like to use WebAuthenticator when also using Azure App Service Authentication. Unfortunately, EasyAuth does not return the token and expiry in a format that WebAuthenticator understands. To fix this, I propose that we add a “ResponseDecoder” option to WebAuthenticator.
Public API Changes
I’d suggest having a new interface IWebAuthenticatorResponseDecoder:
public interface IWebAuthenticatorResponseDecoder
{
IDictionary<string, string> DecodeResponseUri(Uri uri);
}
Then, in WebAuthenticator, have a new public property:
public IWebAuthenticatorResponseDecoder? ResponseDecoder { get; set; }
This gets passed as an optional parameter to the constructor of WebAuthenticatorResult (the one that gets passed the Uri). When the response decoder is not null, it is called to convert the Uri into a dictionary (and then everything progresses as normal). When the response decoder is null, the current method (WebUtils.ParseQueryString()) is used to decode the response.
Intended Use-Case
Authenticating to Azure App Service when using Azure App Service Authentication & Authorization.
The generalized method proposed allows customers to parse the callback URL for any platform, and allows App Service to release their own package that has the decoder in it if they desire.
Issue Analytics
- State:
- Created 10 months ago
- Reactions:2
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
An example of an App Service response:
I’ve replaced some critical letters in the auth token a userId SID for security.
Yep can totally replicate this.
I set up a server side authenticator following the tutorial on Microsoft Learn: https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/communication/authentication?view=net-maui-7.0&tabs=android
When my WebAuthenticator calls my endpoint, via WebAuthenticator.Default.AuthenticateAsync, the API endpoint processes the Auth request then when returning back to the MAUI app - nothing… the MAUI app just freezes and a response is never captured when debugging…
Anyone know a workaround?