Hello Hive Community Members,
With this post, today I will share an update on hive-authentication package that we've built & maintaining it as an open source. You can find all about it by clicking following link
https://github.com/sag333ar/hive-authentication
You can also find it on npmjs.com with following link
https://www.npmjs.com/package/hive-authentication
We added support for dark mode & light mode. After updating to latest version of package, you may follow the steps listed below to add support for dark or light mode.
const [theme, setTheme] = useState<"light" | "dark">("light");
In this example, we are using light mode as default.
useEffect(() => {
// Apply the theme manually by setting a data-theme attribute on the HTML element
document.documentElement.setAttribute("data-theme", theme);
}, [theme]);
{/* Theme Toggle */}
<div className="flex justify-end mb-4">
<button
className="btn btn-outline"
onClick={() => setTheme(theme === "light" ? "dark" : "light")}
>
Switch to {theme === "light" ? "Dark" : "Light"} Mode
</button>
</div>
<AuthButton
onAuthenticate={handleAuthenticate}
aioha={aioha}
onClose={() => {
console.log("AuthButton dialog closed");
}}
onSignMessage={(username) => {
return `${new Date().toISOString()}:${username}`;
}}
theme={theme} // Pass theme to AuthButton
/>
That's it & you are all set with it. Keep using hive-authentication package & share feedback if you've any.
| Contribution | To | Hive | Ecosystem |
|---|---|---|---|
| Hive Witness Node | Hive API Node | 3Speak Video Encoder Node Operator (highest number of nodes) | 3Speak Mobile App Developer |
| Podcast App Developer | 3Shorts App Developer | 3Speak Support & Maintenance Team | Distriator Developer |
| CheckinWithXYZ | Hive Inbox | HiFind | Hive Donate App |
| Contributed to HiveAuth Mobile App | Ecency ↔ 3Speak Integration | Ecency ↔ InLeo Integration | Ecency ↔ Actifit Integration |
| Hive Stats App | Vote for Witness App | HiveFlutterKit | New 3Speak App |
❤️ Appreciate my work? Consider supporting @threespeak &
@sagarkothari88! ❤️
| Vote | For | Witness |
|---|---|---|
| sagarkothari88 | ||
| threespeak |