npm install face-guardian --save-dev
or
yarn add -D face-guardian
Add FaceLogin
to your component:
import React from 'react';
import ReactDOM from 'react-dom';
import { FaceLogin, useUserData } from 'face-guardian';
const App = () => {
const userData = useUserData();
return (
<React.StrictMode>
<FaceLogin
appId="your-app-id"
buttonStyles={{ background: 'red', fontSize: '20px' }}
buttonText="Custom Button Text"
/>
{userData && <div>Welcome, {userData.name}!</div>}
</React.StrictMode>
);
};
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(<App />);
We welcome contributions to the Face Guardian package! Please refer to our Contributing Guidelines for detailed information on how you can contribute.
If you're having trouble with the package, please open an issue on the GitHub repository. We'll do our best to help you out.
The Face Guardian package is open source software licensed as MIT.