UNPKG

@devfamily/admiral

Version:

Admiral is a frontend framework for creating back office using React. It provides out-of-the-box components and tools that make developing an admin interface easy and fast.

12 lines (11 loc) 522 B
declare const useLogin: () => Login; /** * Log a user in by calling the authProvider.login() method * * @param {Object} params Login parameters to pass to the authProvider. May contain username/email, password, etc * @param {string} pathName The path to redirect to after login. By default, redirects to the home page, or to the last page visited after disconnection. * * @return {Promise} The authProvider response */ declare type Login = (params: any, pathName?: string) => Promise<any>; export default useLogin;