A React component library for integrating Zalo OAuth 2.0 authentication using PKCE flow (v1.0.70). It provides pre-built components like ZaloLoginButton, ZaloStyledButton, and ZaloLoginPopup along with a useZaloAuthKit hook. Release cadence is irregular; latest version 1.0.70. Key differentiator: it's the only dedicated React package for Zalo social login (popular in Vietnam), handling PKCE code challenge/verifier client-side. Requires firebase for storing user data and react-new-window for popup. Minimal documentation.
npm install react-zalo-auth-kitNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Setup Zalo login with pre-built button, handling success callback and user info display.
Set up a Firebase app and provide the Firebase config via environment variables or context. Alternatively, modify the callback to handle credentials without Firebase.
Verify the domain on Zalo Developers portal and ensure redirectUri prop matches the registered callback URL (e.g., https://yourapp.com).
Import them via subpaths: import ZaloLoginPopup from 'react-zalo-auth-kit/ZaloLoginPopup'; import ZaloStyledButton from 'react-zalo-auth-kit/ZaloStyledButton'.
Install firebase@9.14.0 explicitly. If using firebase v10+, the package may break; consider forking or using an older firebase.
In Zalo Developers settings, turn OFF the option: 'Check the secret key when calling API to get the access token' for client-side PKCE to work.
Make sure package is installed: npm install react-zalo-auth-kit. Then import using the exact subpath: import ZaloLoginPopup from 'react-zalo-auth-kit/ZaloLoginPopup'.
Change import to: import { useZaloAuthKit } from 'react-zalo-auth-kit'Initialize Firebase in your app before using any component: import { initializeApp } from 'firebase/app'; initializeApp({ apiKey: '...', ... });