---
title: "init(user:serviceIdentifier:userInfo:)"
framework: authenticationservices
role: symbol
role_heading: Initializer
path: "authenticationservices/asaccountauthenticationmodificationreplacepasswordwithsigninwithapplerequest/init(user:serviceidentifier:userinfo:)"
---

# init(user:serviceIdentifier:userInfo:)

Creates a request to upgrade from using passwords to using Sign in with Apple.

## Declaration

```swift
init(user: String, serviceIdentifier: ASCredentialServiceIdentifier, userInfo: [AnyHashable : Any]? = nil)
```

## Parameters

- `user`: The user name of the account to upgrade.
- `serviceIdentifier`: An identifier that represents a particular service that the user needs a credential for, like a web site.
- `userInfo`: A dictionary that contains values to pass to your account modification extension.

## Return Value

Return Value An initialized request object with details about the account to upgrade to Sign in with Apple.

## Discussion

Discussion If your extension needs information to authenticate with your server, such as an authentication token, set it in the userInfo dictionary before calling this method.

## See Also

### Creating Upgrade Requests in Your App

- [user](authenticationservices/asaccountauthenticationmodificationreplacepasswordwithsigninwithapplerequest/user.md)
- [serviceIdentifier](authenticationservices/asaccountauthenticationmodificationreplacepasswordwithsigninwithapplerequest/serviceidentifier.md)
- [userInfo](authenticationservices/asaccountauthenticationmodificationreplacepasswordwithsigninwithapplerequest/userinfo.md)
