Home > @plasmicapp/auth-react > usePlasmicAuth
usePlasmicAuth() function
Handles the authentication flow for Plasmic Auth and returns the user and token
Signature:
export declare function usePlasmicAuth(opts: {
host?: string;
appId?: string;
}): {
user: PlasmicUser | null | undefined;
token: string | null | undefined;
isUserLoading: boolean | undefined;
};
Parameters
Parameter | Type | Description |
---|---|---|
opts | { host?: string; appId?: string; } |
Returns:
{ user: PlasmicUser | null | undefined; token: string | null | undefined; isUserLoading: boolean | undefined; }