UNPKG

naim-firebase-auth-wrapper

Version:

React components and hooks for Firebase Authentication and Firestore with Mantine UI

54 lines 2.83 kB
/** * Firebase Authentication Wrapper for React * * IMPORTANT NOTES FOR NEXT.JS USERS: * When using this package with Next.js, you should: * 1. Import the components only in client components (use 'use client' directive) * 2. Add the package to transpilePackages in next.config.js: * ```js * module.exports = { * transpilePackages: ['naim-firebase-auth-wrapper'] * } * ``` */ // Add a warning for Next.js server components if (typeof window === 'undefined' && (typeof process !== 'undefined' && process.env && (process.env.__NEXT_RUNTIME || process.env.NEXT_RUNTIME))) { console.warn('\n⚠️ Warning: You are importing naim-firebase-auth-wrapper in a server environment.\n' + 'This package contains client-side components that should only be used in client components.\n' + 'Please add the "use client" directive to your component or create a client component wrapper.\n' + 'For server-side functionality, import from "naim-firebase-auth-wrapper/server" instead.\n'); } // Core Components export { AuthProvider } from './components/AuthProvider'; export { Login } from './components/Login'; export { Register } from './components/Register'; export { Logout } from './components/Logout'; export { PasswordChange } from './components/PasswordChange'; export { StylesProvider } from './components/StylesProvider'; export { UserProfile } from './components/UserProfile'; export { UserAdminDashboard } from './components/UserAdminDashboard'; export { OrganizationSelector } from './components/OrganizationSelector'; export { CreateOrganization } from './components/CreateOrganization'; export { OrganizationManagement } from './components/OrganizationManagement'; export { SessionManager } from './components/SessionManager'; export { InviteUserForm } from './components/InviteUserForm'; export { InvitationList } from './components/InvitationList'; export { AcceptInvitation } from './components/AcceptInvitation'; // Hooks export { useAuth } from './hooks/useAuth'; // Services export { // User services getUserProfile, updateUserProfile, createUserProfile, getAllUsers, deleteUser, // Organization services createOrganization, getOrganization, getUserOrganizations, updateOrganization, deleteOrganization, setCurrentOrganization, addUserToOrganization, getOrganizationMembers, removeUserFromOrganization, // Session services createSession, updateSessionActivity, getUserSessions, terminateSession, validateSession, clearSession, // Invitation services createInvitation, getInvitationsByEmail, getInvitationsByOrg, getInvitationByToken, resendInvitation, cancelInvitation, acceptInvitation, declineInvitation } from './services/firestore'; // Import CSS last to ensure it's included in the bundle import './styles.css'; //# sourceMappingURL=index.js.map