---
title: "init(credentialIdentity:clientDataHash:userVerificationPreference:supportedAlgorithms:)"
framework: authenticationservices
role: symbol
role_heading: Initializer
path: "authenticationservices/aspasskeycredentialrequest/init(credentialidentity:clientdatahash:userverificationpreference:supportedalgorithms:)-1jihy"
---

# init(credentialIdentity:clientDataHash:userVerificationPreference:supportedAlgorithms:)

Initializes a passkey credential request, identifying supported algorithms by number.

## Declaration

```swift
convenience init(credentialIdentity: ASPasskeyCredentialIdentity, clientDataHash: Data, userVerificationPreference: ASAuthorizationPublicKeyCredentialUserVerificationPreference, supportedAlgorithms: [NSNumber])
```

## Parameters

- `credentialIdentity`: The identity of the requested passkey credential.
- `clientDataHash`: Hash of the client data from the passkey authentication challenge.
- `userVerificationPreference`: The relying party’s user verification preference.
- `supportedAlgorithms`: An array of numbers that represent cryptographic signature algorithms the identifying party supports.

## Discussion

Discussion The supportedAlgorithms parameter is empty for credential assertion requests. For credential registration requests, it contains one or more numbers from the Internet Assigned Numbers Authority (IANA) Concise Binary Object Representation Object Signing and Encryption (COSE) algorithms registry.

## See Also

### Creating passkey credential requests

- [init(credentialIdentity:clientDataHash:userVerificationPreference:supportedAlgorithms:)](authenticationservices/aspasskeycredentialrequest/init(credentialidentity:clientdatahash:userverificationpreference:supportedalgorithms:)-52txr.md)
- [init(credentialIdentity:clientDataHash:userVerificationPreference:supportedAlgorithms:extensionInput:)](authenticationservices/aspasskeycredentialrequest/init(credentialidentity:clientdatahash:userverificationpreference:supportedalgorithms:extensioninput:)-9hsyv.md)
- [init(credentialIdentity:clientDataHash:userVerificationPreference:supportedAlgorithms:extensionInput:)](authenticationservices/aspasskeycredentialrequest/init(credentialidentity:clientdatahash:userverificationpreference:supportedalgorithms:extensioninput:)-1258o.md)
