<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 12.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.2.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASWebAuthenticationSessionError",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "s:SC35ASWebAuthenticationSessionErrorCodeLeV"
  },
  "title" : "ASWebAuthenticationSessionError"
}
-->

# ASWebAuthenticationSessionError

Errors that a web authentication session can generate.

```
struct ASWebAuthenticationSessionError
```

## Topics

### Error Domain

[`let ASWebAuthenticationSessionErrorDomain: String`](/documentation/AuthenticationServices/ASWebAuthenticationSessionErrorDomain)

The error domain for a web authentication session.

### Error Codes

[`static var canceledLogin: ASWebAuthenticationSessionError.Code`](/documentation/AuthenticationServices/ASWebAuthenticationSessionError/canceledLogin)

The login has been canceled.

[`static var presentationContextNotProvided: ASWebAuthenticationSessionError.Code`](/documentation/AuthenticationServices/ASWebAuthenticationSessionError/presentationContextNotProvided)

A context wasn’t provided.

[`static var presentationContextInvalid: ASWebAuthenticationSessionError.Code`](/documentation/AuthenticationServices/ASWebAuthenticationSessionError/presentationContextInvalid)

The context was invalid.

[`enum Code`](/documentation/AuthenticationServices/ASWebAuthenticationSessionError/Code)

The error code for a web authentication session error.

### Description

### Comparing Errors

### Type Properties

[`static var errorDomain: String`](/documentation/AuthenticationServices/ASWebAuthenticationSessionError/errorDomain)

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Error`](/documentation/Swift/Error)

[`Sendable`](/documentation/Swift/Sendable)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomNSError`](/documentation/Foundation/CustomNSError)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)