@narangcia-oss/cryptic-auth-client-react
Version:
React hooks and components for cryptic-auth authentication with seamless OAuth2 integration
22 lines (19 loc) • 402 B
text/typescript
import { useAuth } from "../context/AuthContext";
/**
* Hook for handling traditional username/password authentication
*/
export function useCredentialAuth() {
const { login, signup, isLoading, error } = useAuth();
return {
/**
* Login with username and password
*/
login,
/**
* Sign up with username and password
*/
signup,
isLoading,
error,
};
}