I’ve a MAUI venture which makes use of Net Authenticator. The whole lot is ok if I take advantage of Net Authenticator solely (Google, MS, Apple).
I used this tutorial.
If I take advantage of the next code for signing in on iOS 13+ all the pieces appears to work, however the authUrl won’t ever triggered. I’ve no Thought how you can go an authUrl to AppleSignInAuthenticator.AuthenticateAsync().
var scheme = "..."; // Apple, Microsoft, Google, Fb, and so forth.
var authUrlRoot = "https://instance.org/mobileauth/";
WebAuthenticatorResult consequence = null;
if (scheme.Equals("Apple")
&& DeviceInfo.Platform == DevicePlatform.iOS
&& DeviceInfo.Model.Main >= 13)
{
// Use Native Apple Signal In API's
consequence = await AppleSignInAuthenticator.AuthenticateAsync();
}
else
{
// Net Authentication move
var authUrl = new Uri($"{authUrlRoot}{scheme}");
var callbackUrl = new Uri("myapp://");
consequence = await WebAuthenticator.Default.AuthenticateAsync(authUrl, callbackUrl);
}
var authToken = string.Empty;
if (consequence.Properties.TryGetValue("title", out string title) && !string.IsNullOrEmpty(title))
authToken += $"Title: {title}{Surroundings.NewLine}";
if (consequence.Properties.TryGetValue("e mail", out string e mail) && !string.IsNullOrEmpty(e mail))
authToken += $"E mail: {e mail}{Surroundings.NewLine}";
// Be aware that Apple Signal In has an IdToken and never an AccessToken
authToken += consequence?.AccessToken ?? consequence?.IdToken;
Perhaps I misunderstand one thing.