---
title: "beginKeyRotation(_:)"
framework: authenticationservices
role: symbol
role_heading: Instance Method
path: "authenticationservices/asauthorizationproviderextensionloginmanager/beginkeyrotation(_:)"
---

# beginKeyRotation(_:)

## Declaration

```swift
func beginKeyRotation(_ keyType: ASAuthorizationProviderExtensionKeyType) -> SecKey?
```

## Parameters

- `keyType`: The key type to retrieve.

## Discussion

Discussion Generates a new key for the specified platform SSO key type using the strongest supported key strength returning the new key.  Nil is returned if there is an error generating the new key.
