---
title: "init(serviceIdentifier:user:recordIdentifier:)"
framework: authenticationservices
role: symbol
role_heading: Initializer
path: "authenticationservices/aspasswordcredentialidentity/init(serviceidentifier:user:recordidentifier:)"
---

# init(serviceIdentifier:user:recordIdentifier:)

Initializes a password credential identity.

## Declaration

```swift
init(serviceIdentifier: ASCredentialServiceIdentifier, user: String, recordIdentifier: String?)
```

## Parameters

- `serviceIdentifier`: The service identifier for the identity.
- `user`: The user associated with the identity.
- `recordIdentifier`: A string that your app can set to correlate the identity with an entry in your password database.

## See Also

### Creating a credential identity

- [ASCredentialServiceIdentifier](authenticationservices/ascredentialserviceidentifier.md)
