Updates
This commit is contained in:
parent
d627655422
commit
9dbaca5ebe
@ -1,8 +1,8 @@
|
||||
// @ts-check
|
||||
|
||||
const serverError = require("./serverError");
|
||||
const { default: grabUserSchemaData } = require("./grabUserSchemaData");
|
||||
const { default: setUserSchemaData } = require("./setUserSchemaData");
|
||||
const grabUserSchemaData = require("./grabUserSchemaData");
|
||||
const setUserSchemaData = require("./setUserSchemaData");
|
||||
const createDbFromSchema = require("../../shell/createDbFromSchema");
|
||||
const grabSchemaFieldsFromData = require("./grabSchemaFieldsFromData");
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
|
4
users/login-user.d.ts
vendored
4
users/login-user.d.ts
vendored
@ -23,11 +23,12 @@ export = loginUser;
|
||||
* @param {string | number} [params.user_id] - User ID
|
||||
* @param {boolean} [params.skipPassword]
|
||||
* @param {boolean} [params.useLocal]
|
||||
* @param {boolean} [params.skipWriteAuthFile] - Skip writing auth file to `.tmp/login` folder
|
||||
* @param {string | number} [params.apiUserID] - Required for setting of cookies
|
||||
*
|
||||
* @returns { Promise<import("../package-shared/types").APILoginFunctionReturn>}
|
||||
*/
|
||||
declare function loginUser({ key, payload, database, additionalFields, response, encryptionKey, encryptionSalt, email_login, email_login_code, temp_code_field, token, user_id, skipPassword, useLocal, apiUserID, }: {
|
||||
declare function loginUser({ key, payload, database, additionalFields, response, encryptionKey, encryptionSalt, email_login, email_login_code, temp_code_field, token, user_id, skipPassword, useLocal, apiUserID, skipWriteAuthFile, }: {
|
||||
key?: string;
|
||||
database: string;
|
||||
payload: {
|
||||
@ -48,6 +49,7 @@ declare function loginUser({ key, payload, database, additionalFields, response,
|
||||
user_id?: string | number;
|
||||
skipPassword?: boolean;
|
||||
useLocal?: boolean;
|
||||
skipWriteAuthFile?: boolean;
|
||||
apiUserID?: string | number;
|
||||
}): Promise<import("../package-shared/types").APILoginFunctionReturn>;
|
||||
import http = require("http");
|
||||
|
@ -41,6 +41,7 @@ const {
|
||||
* @param {string | number} [params.user_id] - User ID
|
||||
* @param {boolean} [params.skipPassword]
|
||||
* @param {boolean} [params.useLocal]
|
||||
* @param {boolean} [params.skipWriteAuthFile] - Skip writing auth file to `.tmp/login` folder
|
||||
* @param {string | number} [params.apiUserID] - Required for setting of cookies
|
||||
*
|
||||
* @returns { Promise<import("../package-shared/types").APILoginFunctionReturn>}
|
||||
@ -61,6 +62,7 @@ async function loginUser({
|
||||
skipPassword,
|
||||
useLocal,
|
||||
apiUserID,
|
||||
skipWriteAuthFile,
|
||||
}) {
|
||||
const grabedHostNames = grabHostNames();
|
||||
const { host, port, scheme } = grabedHostNames;
|
||||
@ -247,7 +249,7 @@ async function loginUser({
|
||||
userId: apiUserID || user_id || grabedHostNames.user_id,
|
||||
});
|
||||
|
||||
if (httpResponse.csrf) {
|
||||
if (httpResponse.csrf && !skipWriteAuthFile) {
|
||||
writeAuthFile(
|
||||
httpResponse.csrf,
|
||||
JSON.stringify(httpResponse.payload)
|
||||
|
Loading…
Reference in New Issue
Block a user