Skip to content

Commit

Permalink
Enable MacCatalyst for the Apple Sign In Authenticator (#15188)
Browse files Browse the repository at this point in the history
  • Loading branch information
Redth authored May 19, 2023
1 parent 0072052 commit 3b62095
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ partial class AppleSignInAuthenticatorImplementation : IAppleSignInAuthenticator

public async Task<WebAuthenticatorResult> AuthenticateAsync(AppleSignInAuthenticator.Options options)
{
if (!OperatingSystem.IsIOSVersionAtLeast(13))
if (OperatingSystem.IsIOS() && !OperatingSystem.IsIOSVersionAtLeast(13))
throw new FeatureNotSupportedException();

if (OperatingSystem.IsMacCatalyst() && !OperatingSystem.IsMacCatalystVersionAtLeast(13, 1))
throw new FeatureNotSupportedException();

var provider = new ASAuthorizationAppleIdProvider();
Expand Down Expand Up @@ -60,6 +63,7 @@ public async Task<WebAuthenticatorResult> AuthenticateAsync(AppleSignInAuthentic
}

[System.Runtime.Versioning.SupportedOSPlatform("ios13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst13.1")]
class AuthManager : NSObject, IASAuthorizationControllerDelegate, IASAuthorizationControllerPresentationContextProviding
{
public Task<ASAuthorizationAppleIdCredential> GetCredentialsAsync()
Expand Down

0 comments on commit 3b62095

Please sign in to comment.