Closed
Description
New Issue Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Issue Description
Modify existing authData data, error 'Error: qq code is required'
Steps to reproduce
auth: {
sms: {
module: SMSAuth,
enabled: true
},
qq: {
module: QQAuth,
enabled: true,
clientId: "clientId",
clientSecret: "clientSecret"
},
qq_unionid: {
module: QQUNIONIDAuth,
enabled: true
},
export class QQAuth extends MyBaseAuth {
constructor() {
super("qq");
}
async getUserFromAccessToken(access_token, authData) {
return authData.id
}
async getAccessTokenFromCode(authData) {
return "access_token"
}
}
export class MyBaseAuth {
constructor(adapterName) {
this.adapterName = adapterName;
if (!this.policy) {
this.policy = 'default';
}
}
validateOptions(options) {
}
async beforeFind(authData) {
return {
id: authData.id,
}
}
validateLogin(authData) {
// User validation is already done in beforeFind
return {
id: authData.id,
}
}
validateSetUp(authData) {
// User validation is already done in beforeFind
return {
id: authData.id,
}
}
afterFind(authData) {
return {
id: authData.id,
}
}
validateUpdate(authData) {
// User validation is already done in beforeFind
return {
id: authData.id,
}
}
}
when old user authData
{
"qq": {
"id": "0B0641D902907353D75FD4756AB3A888"
},
"qq_unionid": {
"id": "UID_E2EE11B8C12C4A1A653A3DDCFBD415D8"
}
}
when i edit the authData in dashboard and save. error appear
Error: qq code is required
Actual Outcome
Error: qq code is required
Expected Outcome
save authData success
Environment
Server
- Parse Server version:
8.0.2
- Operating system:
win10
- Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Local
Database
- System (MongoDB or Postgres):
MongoDB
- Database version:
7.0
- Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
Local
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
no
- SDK version:
no
Logs
CloudImplement: Error: qq code is required.
at handleError (/app/node_modules/parse-server/node_modules/parse/lib/node/RESTController.js:292:17)
at processTicksAndRejections (node:internal/process/task_queues:95:5)