---
title: "platformCredentials(forRelyingParty:)"
framework: authenticationservices
role: symbol
role_heading: Instance Method
path: "authenticationservices/asauthorizationwebbrowserpublickeycredentialmanager/platformcredentials(forrelyingparty:)"
---

# platformCredentials(forRelyingParty:)

Gets a list of passkeys available for authenticating with the given relying party.

## Declaration

```swift
func platformCredentials(forRelyingParty relyingParty: String) async -> [ASAuthorizationWebBrowserPlatformPublicKeyCredential]
```

## Parameters

- `relyingParty`: The name of the relying party, which you receive from the web server that issues the authentication challenge.

## Return Value

Return Value A list of credentials stored on the keychain, or managed by third-party credential managers, that are appropriate for responding to the current challenge.

## Discussion

Discussion Before calling this method, check that the value of authorizationStateForPlatformCredentials is ASAuthorizationWebBrowserPublicKeyCredentialManager.AuthorizationState.authorized and call requestAuthorizationForPublicKeyCredentials(_:) if your app needs authorization. If you call this method without authorization, it returns an empty array.

## See Also

### Using passkeys

- [ASAuthorizationWebBrowserPlatformPublicKeyCredential](authenticationservices/asauthorizationwebbrowserplatformpublickeycredential-swift.struct.md)
