---
title: "changePIN(from:to:)"
framework: passkit
role: symbol
role_heading: Instance Method
path: "passkit/jpkipasscontents/useridentity-swift.struct/changepin(from:to:)"
---

# changePIN(from:to:)

A function that allows for the change of the PIN associated with the user identity.

## Declaration

```swift
func changePIN(from oldValue: String, to newValue: String) async throws
```

## Parameters

- `oldValue`: The user authentication value used to perform the request to change the PIN.
- `newValue`: The new user authentication value applied to user identity.

## See Also

### Identifying the pass user

- [userIdentity](passkit/jpkipasscontents/useridentity-swift.property.md)
- [JPKIPassContents.UserIdentity.AuthenticationType](passkit/jpkipasscontents/useridentity-swift.struct/authenticationtype.md)
