new QqAdapter(options)
Parse Server Configuration
To configure Parse Server for QQ authentication, use the following structure:
Secure Configuration
{
"auth": {
"qq": {
"clientId": "your-app-id",
"clientSecret": "your-app-secret"
}
}
}
Insecure Configuration (Not Recommended)
{
"auth": {
"qq": {
"enableInsecureAuth": true
}
}
}
The adapter requires the following authData
fields:
- Secure Authentication:
code
,redirect_uri
. - Insecure Authentication (Not Recommended):
id
,access_token
.
Auth Payloads
Secure Authentication Payload
{
"qq": {
"code": "abcd1234",
"redirect_uri": "https://your-redirect-uri.com/callback"
}
}
Insecure Authentication Payload (Not Recommended)
{
"qq": {
"id": "1234567",
"access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
Notes
- Secure authentication exchanges the
code
andredirect_uri
provided by the client for an access token using QQ's OAuth API. - Insecure authentication validates the
id
andaccess_token
directly, bypassing OAuth flows. This approach is not recommended and may be deprecated in future versions.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | The adapter configuration options. Properties
|