35 lines
923 B
TypeScript
35 lines
923 B
TypeScript
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;
|
|
};
|
|
/**
|
|
* # SERVER FUNCTION: Login with google Function
|
|
*/
|
|
export default function githubAuth({ key, code, email, database, clientId, clientSecret, response, encryptionKey, encryptionSalt, additionalFields, user_id, additionalData, }: Param): Promise<FunctionReturn | undefined>;
|
|
export {};
|