---
title: "completeRequest(withSelectedCredential:completionHandler:)"
framework: authenticationservices
role: symbol
role_heading: Instance Method
path: "authenticationservices/ascredentialproviderextensioncontext/completerequest(withselectedcredential:completionhandler:)"
---

# completeRequest(withSelectedCredential:completionHandler:)

Provides the user-selected credential.

## Declaration

```swift
func completeRequest(withSelectedCredential credential: ASPasswordCredential, completionHandler: ((Bool) -> Void)? = nil)
```

## Parameters

- `credential`: The credential that the user selected.
- `completionHandler`: Optional work that the extension performs as a background priority task after the request completes. The expired parameter is YES if the system prematurely terminates a previous non-expiration invocation of the completionHandler.

## Discussion

Discussion After calling this method, the system dismisses the associated view controller.

## See Also

### Providing credentials

- [completeAssertionRequest(using:completionHandler:)](authenticationservices/ascredentialproviderextensioncontext/completeassertionrequest(using:completionhandler:).md)
- [completeRegistrationRequest(using:completionHandler:)](authenticationservices/ascredentialproviderextensioncontext/completeregistrationrequest(using:completionhandler:).md)
- [completeOneTimeCodeRequest(using:completionHandler:)](authenticationservices/ascredentialproviderextensioncontext/completeonetimecoderequest(using:completionhandler:).md)
- [ASPasswordCredential](authenticationservices/aspasswordcredential.md)
- [ASPasskeyAssertionCredential](authenticationservices/aspasskeyassertioncredential.md)
- [ASPasskeyRegistrationCredential](authenticationservices/aspasskeyregistrationcredential.md)
- [ASOneTimeCodeCredential](authenticationservices/asonetimecodecredential.md)
