Updates
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
type Param = {
|
||||
clientId: string;
|
||||
redirectUrl: string;
|
||||
setLoading?: (arg0: boolean) => void;
|
||||
scopes?: string[];
|
||||
};
|
||||
/**
|
||||
* Login with Github Function
|
||||
* ===============================================================================
|
||||
* @description This function uses github api to login a user with datasquirel
|
||||
*/
|
||||
export default function getAccessToken({ clientId, redirectUrl, setLoading, scopes, }: Param): void;
|
||||
export {};
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
interface GoogleGetAccessTokenFunctionParams {
|
||||
clientId: string;
|
||||
triggerPrompt?: boolean;
|
||||
setLoading?: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
}
|
||||
/**
|
||||
* Login with Google Function
|
||||
* ===============================================================================
|
||||
* @description This function uses google identity api to login a user with datasquirel
|
||||
*/
|
||||
export default function getAccessToken(params: GoogleGetAccessTokenFunctionParams): Promise<string>;
|
||||
/**
|
||||
* # Google Login Function
|
||||
*/
|
||||
export declare function googleLogin({ google, clientId, setLoading, triggerPrompt, }: GoogleGetAccessTokenFunctionParams & {
|
||||
google: any;
|
||||
}): Promise<unknown>;
|
||||
export {};
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* Login with Google Function
|
||||
* ===============================================================================
|
||||
* @description This function uses google identity api to login a user with datasquirel
|
||||
*/
|
||||
export default function logout(params?: {
|
||||
googleClientId?: any;
|
||||
}): Promise<boolean>;
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
import { APILoginFunctionReturn } from "../../package-shared/types";
|
||||
/**
|
||||
* Client Setup After Login
|
||||
* ===============================================================================
|
||||
* @description This function sets local storage variables like `csrf` after a user
|
||||
* is logged in. Use this in conjunction with the `datasquirel.user.loginUser`
|
||||
* function
|
||||
*/
|
||||
export default function postLogin(res: APILoginFunctionReturn): boolean;
|
||||
Reference in New Issue
Block a user