Merge pull request from GHSA-23r4-5mxp-c7g5

This commit is contained in:
Manuel
2021-08-18 22:24:29 +02:00
parent 3c00bcd791
commit 1306da7454
5 changed files with 2059 additions and 3511 deletions

View File

@@ -857,7 +857,11 @@ RestWrite.prototype.createSessionToken = async function () {
return;
}
const { sessionData, createSession } = Auth.createSession(this.config, {
if (this.storage['authProvider'] == null && this.data.authData) {
this.storage['authProvider'] = Object.keys(this.data.authData).join(',');
}
const { sessionData, createSession } = RestWrite.createSession(this.config, {
userId: this.objectId(),
createdWith: {
action: this.storage['authProvider'] ? 'login' : 'signup',