---
title: "init(_:onRequest:onCompletion:)"
framework: authenticationservices
role: symbol
role_heading: Initializer
path: "authenticationservices/signinwithapplebutton/init(_:onrequest:oncompletion:)"
---

# init(_:onRequest:onCompletion:)

Creates a Sign in with Apple button.

## Declaration

```swift
nonisolated init(_ label: SignInWithAppleButton.Label = .signIn, onRequest: @escaping (ASAuthorizationAppleIDRequest) -> Void, onCompletion: @escaping (Result<ASAuthorization, any Error>) -> Void)
```

## Parameters

- `label`: The label that appears on the button.
- `onRequest`: The authorization request for an Apple ID.
- `onCompletion`: The completion handler that the system calls when the sign-in completes.

## See Also

### Creating a button

- [SignInWithAppleButton.Label](authenticationservices/signinwithapplebutton/label.md)
- [SignInWithAppleButton.Style](authenticationservices/signinwithapplebutton/style.md)
