<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASOneTimeCodeCredential",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASOneTimeCodeCredential"
  },
  "title" : "ASOneTimeCodeCredential"
}
-->

# ASOneTimeCodeCredential

A one-time passcode (OTP) credential.

```
class ASOneTimeCodeCredential
```

## Topics

### Creating an OTP credential

[`init(code:)`](/documentation/AuthenticationServices/ASOneTimeCodeCredential/init(code:))

Creates a one-time passcode (OTP) credential.

### Accessing the OTP

[`code`](/documentation/AuthenticationServices/ASOneTimeCodeCredential/code)

The one-time passcode.



---

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)