This commit is contained in:
Benjamin Toby
2025-04-18 12:06:15 +01:00
parent 8d38f99bf1
commit 6593047efd
180 changed files with 3965 additions and 2 deletions
@@ -0,0 +1,35 @@
import http from "http";
interface FunctionReturn {
success: boolean;
user: {
id: number;
first_name: string;
last_name: string;
csrf_k: string;
social_id: string;
} | null;
dsqlUserId?: number;
msg?: string;
}
type Param = {
key: string;
code: string;
email: string | null;
database: string;
clientId: string;
clientSecret: string;
response: http.ServerResponse;
encryptionKey: string;
encryptionSalt: string;
additionalFields?: string[];
additionalData?: {
[s: string]: string | number;
};
user_id?: boolean;
secureCookie?: boolean;
};
/**
* # SERVER FUNCTION: Login with google Function
*/
export default function githubAuth({ key, code, email, database, clientId, clientSecret, response, encryptionKey, encryptionSalt, additionalFields, user_id, additionalData, secureCookie, }: Param): Promise<FunctionReturn | undefined>;
export {};
@@ -0,0 +1,22 @@
import http from "http";
import { APILoginFunctionReturn } from "../../../types";
type Param = {
key?: string;
token: string;
database?: string;
response?: http.ServerResponse;
encryptionKey?: string;
encryptionSalt?: string;
additionalFields?: string[];
additionalData?: {
[s: string]: string | number;
};
apiUserID?: string | number;
debug?: boolean;
secureCookie?: boolean;
};
/**
* # SERVER FUNCTION: Login with google Function
*/
export default function googleAuth({ key, token, database, response, encryptionKey, encryptionSalt, additionalFields, additionalData, apiUserID, debug, secureCookie, }: Param): Promise<APILoginFunctionReturn>;
export {};