new AppleGameCenterAdapter(options, authData)
Parse Server Configuration
The following authData
fields are required: id
, publicKeyUrl
, timestamp
, signature
, and salt
. These fields are validated against the configured bundleId
for additional security.
To configure Parse Server for Apple Game Center authentication, use the following structure:
{
"auth": {
"gcenter": {
"bundleId": "com.valid.app"
}
}
Insecure Authentication (Not Recommended)
The following authData
fields are required for insecure authentication: id
, publicKeyUrl
, timestamp
, signature
, salt
, and bundleId
([DEPRECATED]). This flow is insecure and poses potential security risks.
To configure Parse Server for insecure authentication, use the following structure:
{
"auth": {
"gcenter": {
"enableInsecureAuth": true
}
}
Deprecation Notice
The enableInsecureAuth
option and authData.bundleId
parameter are deprecated and may be removed in future releases. Use secure authentication with the bundleId
configured in the options
object instead.
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | Configuration options for the adapter. Properties
| ||||||||||||||||||||||||||||
authData | Object | The authentication data provided by the client. Properties
|
Secure Authentication Example
// Example authData for secure authentication:
const authData = {
gcenter: {
id: "1234567",
publicKeyUrl: "https://valid.apple.com/public/timeout.cer",
timestamp: 1460981421303,
salt: "saltST==",
signature: "PoDwf39DCN464B49jJCU0d9Y0J"
}
};
Insecure Authentication Example (Not Recommended)
// Example authData for insecure authentication:
const authData = {
gcenter: {
id: "1234567",
publicKeyUrl: "https://valid.apple.com/public/timeout.cer",
timestamp: 1460981421303,
salt: "saltST==",
signature: "PoDwf39DCN464B49jJCU0d9Y0J",
bundleId: "com.valid.app" // Deprecated.
}
};