WX Login or known as WxExclipse Authentication is a plugin that provides authentication for the WxExclipse website builder.
It is built on Firebase and uses Firebase Authentication to provide authentication, with custom pages for login, signup and account management.
To install WX Login, simply tap on plugins in the right sidebar and search for WX Login or Firebase Authentication and tap on install.
Plugins can only be installed on the WxExclipse website builder via the plugins tab.
The plugin is accessed via the right sidebar and you will also see additional elements that will be available to you inside the editor.
- Login
- Signup/Register
- Account
These elements can be dragged and dropped into the editor and will be available to you in the editor, they are also customizable via the settings tab.
| Feature | Description |
|---|---|
| Login | Allows users to login to the website |
| Signup/Register | Allows users to signup to the website |
| Account | Allows users to manage their account |
| Realtime updates | Updates in realtime |
| Customizable | Customizable |
| Firebase Authentication | Uses Firebase Authentication |
This plugin uses the internal API's of the WxExclipse website builder to provide authentication to your website.
If you are building a plugin that uses the WxExclipse website builder and that requires authentication, you can use the following API's to integrate with this plugin.
To start, as stated in official plugin documentation, you need to get access to the plugin's API:
import { usePlugins } from '../../../hooks/usePlugins';
export default function MyPlugin() {
import { signInWithEmailAndPassword } from 'firebase/auth';
const { awaitRegistration } = usePlugins();
useEffect(() => {
(async () => {
try {
const auth = await awaitRegistration('wx-login');
const firebaseAuth: Auth = auth.methods.find(method => method.name === 'getAuth')?.method() // This holds the auth provider itself
if (!firebaseAuth) {
console.error('Firebase app not found in wx-login plugin');
return;
}
// Do something with the auth provider, example:
const email = 'your-email';
const password = 'your-password';
await signInWithEmailAndPassword(firebaseAuth, email, password);
} catch (error) {
console.error('Error fetching auth providers:', error);
}
})();
}, []);
}If you would like to contribute to this project, please fork the repository and submit a pull request.
Made with ❤️ by the WX Team.