---
title: ASOneTimeCodeCredential
framework: authenticationservices
role: symbol
role_heading: Class
path: authenticationservices/asonetimecodecredential
---

# ASOneTimeCodeCredential

A one-time passcode (OTP) credential.

## Declaration

```swift
class ASOneTimeCodeCredential
```

## Topics

### Creating an OTP credential

- [init(code:)](authenticationservices/asonetimecodecredential/init(code:).md)

### Accessing the OTP

- [code](authenticationservices/asonetimecodecredential/code.md)

### Initializers

- [init(coder:)](authenticationservices/asonetimecodecredential/init(coder:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [ASAuthorizationCredential](authenticationservices/asauthorizationcredential.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Providing credentials

- [completeRequest(withSelectedCredential:completionHandler:)](authenticationservices/ascredentialproviderextensioncontext/completerequest(withselectedcredential:completionhandler:).md)
- [completeAssertionRequest(using:completionHandler:)](authenticationservices/ascredentialproviderextensioncontext/completeassertionrequest(using:completionhandler:).md)
- [completeRegistrationRequest(using:completionHandler:)](authenticationservices/ascredentialproviderextensioncontext/completeregistrationrequest(using:completionhandler:).md)
- [completeOneTimeCodeRequest(using:completionHandler:)](authenticationservices/ascredentialproviderextensioncontext/completeonetimecoderequest(using:completionhandler:).md)
- [ASPasswordCredential](authenticationservices/aspasswordcredential.md)
- [ASPasskeyAssertionCredential](authenticationservices/aspasskeyassertioncredential.md)
- [ASPasskeyRegistrationCredential](authenticationservices/aspasskeyregistrationcredential.md)
