@reactionable/amplify
Version:
Reactionable package for Amplify
18 lines (17 loc) • 1.24 kB
TypeScript
import { IIdentityProviderProps as ICoreIdentityProviderProps, IIdentityProviderValue as ICoreIdentityProviderValue, IUser as ICoreUser } from "@reactionable/core/lib/identity/Identity";
import { IAuthenticatorProps } from "aws-amplify-react/lib/Auth/Authenticator";
import { ComponentType, PropsWithChildren, ReactElement } from "react";
export declare type IUser = ICoreUser & {
id: string;
username: string;
attributes: {
email: string;
};
};
export { SignIn, ConfirmSignIn, VerifyContact, ForgotPassword, SignUp, SignOut, } from "aws-amplify-react/lib/Auth";
export declare type IIdentityProviderProps = ICoreIdentityProviderProps<IUser> & IAuthenticatorProps;
export declare type IIdentityProviderValue = ICoreIdentityProviderValue<IUser> & IAuthenticatorProps;
export declare const useIdentityProviderProps: (props?: Partial<IIdentityProviderProps>) => IIdentityProviderProps;
export declare function useIdentityContext(): IIdentityProviderValue;
export declare function withIdentityContext(Component: ComponentType, identityProviderProps?: Partial<IIdentityProviderProps>): ReactElement;
export declare const IdentityContextProvider: (props?: PropsWithChildren<Partial<IIdentityProviderProps>>) => ReactElement;