---
title: ASAuthorizationError.Code
framework: authenticationservices
role: symbol
role_heading: Enumeration
path: authenticationservices/asauthorizationerror-swift.struct/code
---

# ASAuthorizationError.Code

Codes that authorization errors can have.

## Declaration

```swift
enum Code
```

## Topics

### Codes

- [ASAuthorizationError.Code.canceled](authenticationservices/asauthorizationerror-swift.struct/code/canceled.md)
- [ASAuthorizationError.Code.failed](authenticationservices/asauthorizationerror-swift.struct/code/failed.md)
- [ASAuthorizationError.Code.invalidResponse](authenticationservices/asauthorizationerror-swift.struct/code/invalidresponse.md)
- [ASAuthorizationError.Code.notHandled](authenticationservices/asauthorizationerror-swift.struct/code/nothandled.md)
- [ASAuthorizationError.Code.unknown](authenticationservices/asauthorizationerror-swift.struct/code/unknown.md)
- [ASAuthorizationError.Code.notInteractive](authenticationservices/asauthorizationerror-swift.struct/code/notinteractive.md)
- [ASAuthorizationError.Code.credentialExport](authenticationservices/asauthorizationerror-swift.struct/code/credentialexport.md)
- [ASAuthorizationError.Code.credentialImport](authenticationservices/asauthorizationerror-swift.struct/code/credentialimport.md)

### Enumeration Cases

- [ASAuthorizationError.Code.deviceNotConfiguredForPasskeyCreation](authenticationservices/asauthorizationerror-swift.struct/code/devicenotconfiguredforpasskeycreation.md)
- [ASAuthorizationError.Code.matchedExcludedCredential](authenticationservices/asauthorizationerror-swift.struct/code/matchedexcludedcredential.md)
- [ASAuthorizationError.Code.preferSignInWithApple](authenticationservices/asauthorizationerror-swift.struct/code/prefersigninwithapple.md)

### Initializers

- [init(rawValue:)](authenticationservices/asauthorizationerror-swift.struct/code/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Error Codes

- [canceled](authenticationservices/asauthorizationerror-swift.struct/canceled.md)
- [failed](authenticationservices/asauthorizationerror-swift.struct/failed.md)
- [invalidResponse](authenticationservices/asauthorizationerror-swift.struct/invalidresponse.md)
- [notHandled](authenticationservices/asauthorizationerror-swift.struct/nothandled.md)
- [unknown](authenticationservices/asauthorizationerror-swift.struct/unknown.md)
- [credentialExport](authenticationservices/asauthorizationerror-swift.struct/credentialexport.md)
- [credentialImport](authenticationservices/asauthorizationerror-swift.struct/credentialimport.md)
