datasquirel/users/social/google-auth.d.ts
Benjamin Toby ff9ce28d1f Updates
2024-12-10 19:51:02 +01:00

33 lines
1.4 KiB
TypeScript

export = googleAuth;
/**
* SERVER FUNCTION: Login with google Function
* ==============================================================================
*
* @async
*
* @param {object} params - main params object
* @param {string} [params.key] - API full access key
* @param {string} params.token - Google access token gotten from the client side
* @param {string} [params.database] - Target database name
* @param {http.ServerResponse} [params.response] - HTTPS response object
* @param {string} [params.encryptionKey] - Encryption key
* @param {string} [params.encryptionSalt] - Encryption salt
* @param {string[]} [params.additionalFields] - Additional Fields to be added to the user object
* @param {string | number} [params.apiUserID] - API user ID
* @param {boolean} [params.useLocal] - Whether to use a remote database instead of API
*
* @returns { Promise<import("../../package-shared/types").APILoginFunctionReturn> }
*/
declare function googleAuth({ key, token, database, response, encryptionKey, encryptionSalt, additionalFields, apiUserID, useLocal, }: {
key?: string;
token: string;
database?: string;
response?: http.ServerResponse;
encryptionKey?: string;
encryptionSalt?: string;
additionalFields?: string[];
apiUserID?: string | number;
useLocal?: boolean;
}): Promise<import("../../package-shared/types").APILoginFunctionReturn>;
import http = require("http");