@digilogiclabs/saas-factory-auth 2.1.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,384 +1,396 @@
1
- # @digilogiclabs/saas-factory-auth
2
-
3
- A universal authentication package supporting both Next.js web applications and React Native mobile apps. Provides a unified API for multiple authentication providers with zero-configuration setup.
4
-
5
- ## Features
6
-
7
- - 🔐 **Multi-Provider Support**
8
- - Supabase Authentication
9
- - Firebase Authentication
10
- - Auto-detection based on environment variables
11
- - 📱 **Cross-Platform**
12
- - Next.js 15+ (App Router)
13
- - React Native with Expo
14
- - React 19+ compatible
15
- - 🚀 **Complete Auth Flows**
16
- - Email/Password authentication
17
- - OAuth providers (Google, GitHub, Facebook, Twitter, Discord, Apple, Microsoft, LinkedIn, Spotify, Twitch, Slack, Notion)
18
- - Magic link (passwordless) authentication
19
- - Password reset
20
- - 🎯 **Modern Architecture**
21
- - TypeScript-first
22
- - Zustand state management
23
- - Provider factory pattern
24
- - Proper error handling with typed errors
25
- - 💾 **Session Management**
26
- - Automatic token refresh
27
- - Persistent sessions
28
- - Custom storage adapters
29
-
30
- ## Installation
31
-
32
- ```bash
33
- npm install @digilogiclabs/saas-factory-auth
34
- # or
35
- yarn add @digilogiclabs/saas-factory-auth
36
- # or
37
- pnpm add @digilogiclabs/saas-factory-auth
38
- ```
39
-
40
- ## Requirements
41
-
42
- - Next.js 15+ or React Native with Expo
43
- - React 19+
44
- - Either Supabase or Firebase project credentials
45
-
46
- ## Quick Start
47
-
48
- ### 1. Configure Environment Variables
49
-
50
- #### For Supabase:
51
- ```env
52
- NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
53
- NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
54
- ```
55
-
56
- #### For Firebase:
57
- ```env
58
- NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key
59
- NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-auth-domain
60
- NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
61
- ```
62
-
63
- #### Optional - Explicit Provider Selection:
64
- ```env
65
- NEXT_PUBLIC_AUTH_PROVIDER=supabase # or 'firebase'
66
- ```
67
-
68
- ### 2. Wrap Your App with AuthProvider
69
-
70
- #### Next.js App Router:
71
- ```tsx
72
- // app/layout.tsx
73
- import { AuthProvider } from '@digilogiclabs/saas-factory-auth';
74
-
75
- export default function RootLayout({
76
- children,
77
- }: {
78
- children: React.ReactNode;
79
- }) {
80
- return (
81
- <html lang="en">
82
- <body>
83
- <AuthProvider>
84
- {children}
85
- </AuthProvider>
86
- </body>
87
- </html>
88
- );
89
- }
90
- ```
91
-
92
- #### React Native:
93
- ```tsx
94
- // App.tsx
95
- import { AuthProvider } from '@digilogiclabs/saas-factory-auth';
96
-
97
- export default function App() {
98
- return (
99
- <AuthProvider>
100
- {/* Your app components */}
101
- </AuthProvider>
102
- );
103
- }
104
- ```
105
-
106
- ### 3. Use the Auth Hook
107
-
108
- ```tsx
109
- 'use client'; // For Next.js App Router
110
-
111
- import { useAuth } from '@digilogiclabs/saas-factory-auth';
112
-
113
- export default function AuthExample() {
114
- const {
115
- user,
116
- loading,
117
- error,
118
- signIn,
119
- signUp,
120
- signOut,
121
- signInWithOAuth,
122
- signInWithMagicLink,
123
- resetPassword
124
- } = useAuth();
125
-
126
- if (loading) return <div>Loading...</div>;
127
- if (error) return <div>Error: {error.message}</div>;
128
-
129
- if (user) {
130
- return (
131
- <div>
132
- <p>Welcome, {user.email}!</p>
133
- <button onClick={() => signOut()}>Sign Out</button>
134
- </div>
135
- );
136
- }
137
-
138
- return (
139
- <div>
140
- <button onClick={() => signIn('user@example.com', 'password')}>
141
- Sign In
142
- </button>
143
- <button onClick={() => signInWithOAuth('google')}>
144
- Sign In with Google
145
- </button>
146
- </div>
147
- );
148
- }
149
- ```
150
-
151
- ## API Reference
152
-
153
- ### `<AuthProvider>`
154
-
155
- The main provider component that initializes authentication.
156
-
157
- ```tsx
158
- interface AuthProviderProps {
159
- children: React.ReactNode;
160
- onAuthChange?: (event: AuthEvent) => void;
161
- autoSignIn?: boolean; // Default: true
162
- }
163
- ```
164
-
165
- ### `useAuth()` Hook
166
-
167
- Returns the complete authentication state and methods:
168
-
169
- ```tsx
170
- interface AuthStore {
171
- // State
172
- user: User | null;
173
- session: AuthSession | null;
174
- loading: boolean;
175
- error: Error | null;
176
-
177
- // Methods
178
- signIn: (email: string, password: string) => Promise<void>;
179
- signUp: (email: string, password: string) => Promise<void>;
180
- signOut: () => Promise<void>;
181
- signInWithOAuth: (provider: OAuthProvider, redirectTo?: string) => Promise<void>;
182
- signInWithMagicLink: (email: string, redirectTo?: string) => Promise<void>;
183
- resetPassword: (email: string) => Promise<void>;
184
- getUser: () => Promise<User | null>;
185
- getSession: () => Promise<AuthSession | null>;
186
- }
187
- ```
188
-
189
- ### Types
190
-
191
- ```tsx
192
- // User object
193
- interface User {
194
- id: string;
195
- email?: string;
196
- name?: string | null;
197
- avatar?: string | null;
198
- [key: string]: any; // Additional metadata
199
- }
200
-
201
- // Session object
202
- interface AuthSession {
203
- user: User;
204
- access_token: string;
205
- refresh_token?: string;
206
- expires_at?: number;
207
- }
208
-
209
- // OAuth providers
210
- type OAuthProvider =
211
- | 'google'
212
- | 'github'
213
- | 'facebook'
214
- | 'twitter'
215
- | 'discord'
216
- | 'apple'
217
- | 'microsoft'
218
- | 'linkedin'
219
- | 'spotify'
220
- | 'twitch'
221
- | 'slack'
222
- | 'notion';
223
-
224
- // Auth events
225
- enum AuthEvent {
226
- SIGNED_IN = 'SIGNED_IN',
227
- SIGNED_OUT = 'SIGNED_OUT',
228
- TOKEN_REFRESHED = 'TOKEN_REFRESHED',
229
- USER_UPDATED = 'USER_UPDATED',
230
- }
231
- ```
232
-
233
- ### Error Handling
234
-
235
- The package provides typed errors for better error handling:
236
-
237
- ```tsx
238
- enum AuthErrorType {
239
- INVALID_CREDENTIALS = 'INVALID_CREDENTIALS',
240
- USER_NOT_FOUND = 'USER_NOT_FOUND',
241
- EMAIL_ALREADY_EXISTS = 'EMAIL_ALREADY_EXISTS',
242
- WEAK_PASSWORD = 'WEAK_PASSWORD',
243
- NETWORK_ERROR = 'NETWORK_ERROR',
244
- PROVIDER_ERROR = 'PROVIDER_ERROR',
245
- CONFIGURATION_ERROR = 'CONFIGURATION_ERROR',
246
- VALIDATION_ERROR = 'VALIDATION_ERROR'
247
- }
248
-
249
- // Usage
250
- const { error } = useAuth();
251
- if (error?.type === AuthErrorType.INVALID_CREDENTIALS) {
252
- // Handle invalid credentials
253
- }
254
- ```
255
-
256
- ## Advanced Usage
257
-
258
- ### Custom Storage (React Native)
259
-
260
- For React Native, you can provide a custom storage implementation:
261
-
262
- ```tsx
263
- import AsyncStorage from '@react-native-async-storage/async-storage';
264
- import { AuthProvider } from '@digilogiclabs/saas-factory-auth';
265
-
266
- const customStorage = {
267
- getItem: async (key: string) => AsyncStorage.getItem(key),
268
- setItem: async (key: string, value: string) => AsyncStorage.setItem(key, value),
269
- removeItem: async (key: string) => AsyncStorage.removeItem(key),
270
- };
271
-
272
- // Pass to provider factory if using advanced configuration
273
- ```
274
-
275
- ### Listen to Auth State Changes
276
-
277
- ```tsx
278
- <AuthProvider
279
- onAuthChange={(event) => {
280
- console.log('Auth event:', event);
281
- // Handle auth state changes
282
- }}
283
- >
284
- {children}
285
- </AuthProvider>
286
- ```
287
-
288
- ### Disable Auto Sign-In
289
-
290
- ```tsx
291
- <AuthProvider autoSignIn={false}>
292
- {children}
293
- </AuthProvider>
294
- ```
295
-
296
- ## Provider-Specific Features
297
-
298
- ### Supabase-Specific
299
- - Row Level Security (RLS) support
300
- - Realtime subscriptions compatibility
301
- - Built-in email verification flows
302
-
303
- ### Firebase-Specific
304
- - Firebase Auth UI compatibility
305
- - Firestore rules integration
306
- - Firebase Admin SDK support
307
-
308
- ## Migration Guide
309
-
310
- ### From v0.3.x to v0.4.x
311
-
312
- 1. **Update imports**: Components like `SignIn`, `SignUp`, `OAuthButtons` are no longer provided. Use the `useAuth` hook directly.
313
-
314
- 2. **Update AuthProvider usage**: Remove any configuration props, configuration is now handled via environment variables.
315
-
316
- 3. **Update auth method calls**: All methods now return promises and handle errors internally:
317
- ```tsx
318
- // Old
319
- const { data, error } = await signIn(email, password);
320
-
321
- // New
322
- try {
323
- await signIn(email, password);
324
- } catch (error) {
325
- // Handle error
326
- }
327
- ```
328
-
329
- ## Troubleshooting
330
-
331
- ### "Auth provider not initialized"
332
- Ensure you've wrapped your app with `<AuthProvider>` at the root level.
333
-
334
- ### "Invalid Supabase URL"
335
- Check that your `NEXT_PUBLIC_SUPABASE_URL` includes the full URL with `https://`.
336
-
337
- ### Network/DNS Errors
338
- Verify your project credentials and ensure the project is not paused (for Supabase).
339
-
340
- ## Contributing
341
-
342
- We welcome contributions! Please see our [contributing guide](CONTRIBUTING.md) for details.
343
-
344
- ## Support
345
-
346
- - [GitHub Issues](https://github.com/DigiLogicLabs/saas-factory-auth/issues)
347
- - [Documentation](https://github.com/DigiLogicLabs/saas-factory-auth/wiki)
348
-
349
- ## License
350
-
351
- MIT © [DigiLogic Labs](https://github.com/DigiLogicLabs)
352
-
353
- ## Changelog
354
-
355
- ### v1.0.1 (Latest)
356
- - **🎉 Enhanced OAuth Provider Support**: Added Microsoft, LinkedIn, Spotify, Twitch, Slack, and Notion OAuth providers
357
- - **🔧 Improved TypeScript Types**: Complete rewrite of User interface with detailed profile fields, metadata support, and extended authentication state tracking
358
- - **✨ Enhanced User Experience**: Better OAuth provider UI with proper branding, icons, and colors for all supported providers
359
- - **📚 Comprehensive Role Support**: Extended UserRole type with additional built-in roles (owner, editor, viewer, contributor, manager, developer, analyst, support)
360
- - **💪 Backward Compatibility**: All changes are non-destructive and maintain full backward compatibility
361
-
362
- ### v1.0.0
363
- - **Major Release**: Production-ready authentication package
364
- - Complete feature parity between Supabase and Firebase providers
365
- - Enhanced error handling and user feedback
366
- - Comprehensive testing and documentation
367
-
368
- ### v0.4.3
369
- - Fixed React hooks usage in auth callbacks
370
- - Improved error handling and network error detection
371
- - Added proper auth provider initialization in store
372
- - Enhanced TypeScript types
373
-
374
- ### v0.4.0
375
- - Complete architecture rewrite
376
- - Added Firebase support alongside Supabase
377
- - Implemented provider factory pattern
378
- - Migrated to Zustand for state management
379
- - React 19 and Next.js 15 compatibility
380
-
381
- ### v0.3.x
382
- - Initial Supabase-only implementation
383
- - Basic authentication flows
384
- - Component-based architecture
1
+ # @digilogiclabs/saas-factory-auth
2
+
3
+ A universal authentication package supporting both Next.js web applications and React Native mobile apps. Provides a unified API for multiple authentication providers with zero-configuration setup.
4
+
5
+ ## Features
6
+
7
+ - 🔐 **Multi-Provider Support**
8
+ - Supabase Authentication
9
+ - Firebase Authentication
10
+ - Auto-detection based on environment variables
11
+ - 📱 **Cross-Platform**
12
+ - Next.js 15+ (App Router)
13
+ - React Native with Expo
14
+ - React 19+ compatible
15
+ - 🚀 **Complete Auth Flows**
16
+ - Email/Password authentication
17
+ - OAuth providers (Google, GitHub, Facebook, Twitter, Discord, Apple, Microsoft, LinkedIn, Spotify, Twitch, Slack, Notion)
18
+ - Magic link (passwordless) authentication
19
+ - Password reset
20
+ - 🎯 **Modern Architecture**
21
+ - TypeScript-first
22
+ - Zustand state management
23
+ - Provider factory pattern
24
+ - Proper error handling with typed errors
25
+ - 💾 **Session Management**
26
+ - Automatic token refresh
27
+ - Persistent sessions
28
+ - Custom storage adapters
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ npm install @digilogiclabs/saas-factory-auth
34
+ # or
35
+ yarn add @digilogiclabs/saas-factory-auth
36
+ # or
37
+ pnpm add @digilogiclabs/saas-factory-auth
38
+ ```
39
+
40
+ ## Requirements
41
+
42
+ - Next.js 15+ or React Native with Expo
43
+ - React 19+
44
+ - Either Supabase or Firebase project credentials
45
+
46
+ ## Quick Start
47
+
48
+ ### 1. Configure Environment Variables
49
+
50
+ #### For Supabase:
51
+
52
+ ```env
53
+ NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
54
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
55
+ ```
56
+
57
+ #### For Firebase:
58
+
59
+ ```env
60
+ NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key
61
+ NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-auth-domain
62
+ NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
63
+ ```
64
+
65
+ #### Optional - Explicit Provider Selection:
66
+
67
+ ```env
68
+ NEXT_PUBLIC_AUTH_PROVIDER=supabase # or 'firebase'
69
+ ```
70
+
71
+ ### 2. Wrap Your App with AuthProvider
72
+
73
+ #### Next.js App Router:
74
+
75
+ ```tsx
76
+ // app/layout.tsx
77
+ import { AuthProvider } from "@digilogiclabs/saas-factory-auth";
78
+
79
+ export default function RootLayout({
80
+ children,
81
+ }: {
82
+ children: React.ReactNode;
83
+ }) {
84
+ return (
85
+ <html lang="en">
86
+ <body>
87
+ <AuthProvider>{children}</AuthProvider>
88
+ </body>
89
+ </html>
90
+ );
91
+ }
92
+ ```
93
+
94
+ #### React Native:
95
+
96
+ ```tsx
97
+ // App.tsx
98
+ import { AuthProvider } from "@digilogiclabs/saas-factory-auth";
99
+
100
+ export default function App() {
101
+ return <AuthProvider>{/* Your app components */}</AuthProvider>;
102
+ }
103
+ ```
104
+
105
+ ### 3. Use the Auth Hook
106
+
107
+ ```tsx
108
+ "use client"; // For Next.js App Router
109
+
110
+ import { useAuth } from "@digilogiclabs/saas-factory-auth";
111
+
112
+ export default function AuthExample() {
113
+ const {
114
+ user,
115
+ loading,
116
+ error,
117
+ signIn,
118
+ signUp,
119
+ signOut,
120
+ signInWithOAuth,
121
+ signInWithMagicLink,
122
+ resetPassword,
123
+ } = useAuth();
124
+
125
+ if (loading) return <div>Loading...</div>;
126
+ if (error) return <div>Error: {error.message}</div>;
127
+
128
+ if (user) {
129
+ return (
130
+ <div>
131
+ <p>Welcome, {user.email}!</p>
132
+ <button onClick={() => signOut()}>Sign Out</button>
133
+ </div>
134
+ );
135
+ }
136
+
137
+ return (
138
+ <div>
139
+ <button onClick={() => signIn("user@example.com", "password")}>
140
+ Sign In
141
+ </button>
142
+ <button onClick={() => signInWithOAuth("google")}>
143
+ Sign In with Google
144
+ </button>
145
+ </div>
146
+ );
147
+ }
148
+ ```
149
+
150
+ ## API Reference
151
+
152
+ ### `<AuthProvider>`
153
+
154
+ The main provider component that initializes authentication.
155
+
156
+ ```tsx
157
+ interface AuthProviderProps {
158
+ children: React.ReactNode;
159
+ onAuthChange?: (event: AuthEvent) => void;
160
+ autoSignIn?: boolean; // Default: true
161
+ }
162
+ ```
163
+
164
+ ### `useAuth()` Hook
165
+
166
+ Returns the complete authentication state and methods:
167
+
168
+ ```tsx
169
+ interface AuthStore {
170
+ // State
171
+ user: User | null;
172
+ session: AuthSession | null;
173
+ loading: boolean;
174
+ error: Error | null;
175
+
176
+ // Methods
177
+ signIn: (email: string, password: string) => Promise<void>;
178
+ signUp: (email: string, password: string) => Promise<void>;
179
+ signOut: () => Promise<void>;
180
+ signInWithOAuth: (
181
+ provider: OAuthProvider,
182
+ redirectTo?: string,
183
+ ) => Promise<void>;
184
+ signInWithMagicLink: (email: string, redirectTo?: string) => Promise<void>;
185
+ resetPassword: (email: string) => Promise<void>;
186
+ getUser: () => Promise<User | null>;
187
+ getSession: () => Promise<AuthSession | null>;
188
+ }
189
+ ```
190
+
191
+ ### Types
192
+
193
+ ```tsx
194
+ // User object
195
+ interface User {
196
+ id: string;
197
+ email?: string;
198
+ name?: string | null;
199
+ avatar?: string | null;
200
+ [key: string]: any; // Additional metadata
201
+ }
202
+
203
+ // Session object
204
+ interface AuthSession {
205
+ user: User;
206
+ access_token: string;
207
+ refresh_token?: string;
208
+ expires_at?: number;
209
+ }
210
+
211
+ // OAuth providers
212
+ type OAuthProvider =
213
+ | "google"
214
+ | "github"
215
+ | "facebook"
216
+ | "twitter"
217
+ | "discord"
218
+ | "apple"
219
+ | "microsoft"
220
+ | "linkedin"
221
+ | "spotify"
222
+ | "twitch"
223
+ | "slack"
224
+ | "notion";
225
+
226
+ // Auth events
227
+ enum AuthEvent {
228
+ SIGNED_IN = "SIGNED_IN",
229
+ SIGNED_OUT = "SIGNED_OUT",
230
+ TOKEN_REFRESHED = "TOKEN_REFRESHED",
231
+ USER_UPDATED = "USER_UPDATED",
232
+ }
233
+ ```
234
+
235
+ ### Error Handling
236
+
237
+ The package provides typed errors for better error handling:
238
+
239
+ ```tsx
240
+ enum AuthErrorType {
241
+ INVALID_CREDENTIALS = "INVALID_CREDENTIALS",
242
+ USER_NOT_FOUND = "USER_NOT_FOUND",
243
+ EMAIL_ALREADY_EXISTS = "EMAIL_ALREADY_EXISTS",
244
+ WEAK_PASSWORD = "WEAK_PASSWORD",
245
+ NETWORK_ERROR = "NETWORK_ERROR",
246
+ PROVIDER_ERROR = "PROVIDER_ERROR",
247
+ CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
248
+ VALIDATION_ERROR = "VALIDATION_ERROR",
249
+ }
250
+
251
+ // Usage
252
+ const { error } = useAuth();
253
+ if (error?.type === AuthErrorType.INVALID_CREDENTIALS) {
254
+ // Handle invalid credentials
255
+ }
256
+ ```
257
+
258
+ ## Advanced Usage
259
+
260
+ ### Custom Storage (React Native)
261
+
262
+ For React Native, you can provide a custom storage implementation:
263
+
264
+ ```tsx
265
+ import AsyncStorage from "@react-native-async-storage/async-storage";
266
+ import { AuthProvider } from "@digilogiclabs/saas-factory-auth";
267
+
268
+ const customStorage = {
269
+ getItem: async (key: string) => AsyncStorage.getItem(key),
270
+ setItem: async (key: string, value: string) =>
271
+ AsyncStorage.setItem(key, value),
272
+ removeItem: async (key: string) => AsyncStorage.removeItem(key),
273
+ };
274
+
275
+ // Pass to provider factory if using advanced configuration
276
+ ```
277
+
278
+ ### Listen to Auth State Changes
279
+
280
+ ```tsx
281
+ <AuthProvider
282
+ onAuthChange={(event) => {
283
+ console.log("Auth event:", event);
284
+ // Handle auth state changes
285
+ }}
286
+ >
287
+ {children}
288
+ </AuthProvider>
289
+ ```
290
+
291
+ ### Disable Auto Sign-In
292
+
293
+ ```tsx
294
+ <AuthProvider autoSignIn={false}>{children}</AuthProvider>
295
+ ```
296
+
297
+ ## Provider-Specific Features
298
+
299
+ ### Supabase-Specific
300
+
301
+ - Row Level Security (RLS) support
302
+ - Realtime subscriptions compatibility
303
+ - Built-in email verification flows
304
+
305
+ ### Firebase-Specific
306
+
307
+ - Firebase Auth UI compatibility
308
+ - Firestore rules integration
309
+ - Firebase Admin SDK support
310
+
311
+ ## Migration Guide
312
+
313
+ ### From v0.3.x to v0.4.x
314
+
315
+ 1. **Update imports**: Components like `SignIn`, `SignUp`, `OAuthButtons` are no longer provided. Use the `useAuth` hook directly.
316
+
317
+ 2. **Update AuthProvider usage**: Remove any configuration props, configuration is now handled via environment variables.
318
+
319
+ 3. **Update auth method calls**: All methods now return promises and handle errors internally:
320
+
321
+ ```tsx
322
+ // Old
323
+ const { data, error } = await signIn(email, password);
324
+
325
+ // New
326
+ try {
327
+ await signIn(email, password);
328
+ } catch (error) {
329
+ // Handle error
330
+ }
331
+ ```
332
+
333
+ ## Troubleshooting
334
+
335
+ ### "Auth provider not initialized"
336
+
337
+ Ensure you've wrapped your app with `<AuthProvider>` at the root level.
338
+
339
+ ### "Invalid Supabase URL"
340
+
341
+ Check that your `NEXT_PUBLIC_SUPABASE_URL` includes the full URL with `https://`.
342
+
343
+ ### Network/DNS Errors
344
+
345
+ Verify your project credentials and ensure the project is not paused (for Supabase).
346
+
347
+ ## Contributing
348
+
349
+ We welcome contributions! Please see our [contributing guide](CONTRIBUTING.md) for details.
350
+
351
+ ## Support
352
+
353
+ - [GitHub Issues](https://github.com/DigiLogicLabs/saas-factory-auth/issues)
354
+ - [Documentation](https://github.com/DigiLogicLabs/saas-factory-auth/wiki)
355
+
356
+ ## License
357
+
358
+ MIT © [DigiLogic Labs](https://github.com/DigiLogicLabs)
359
+
360
+ ## Changelog
361
+
362
+ ### v1.0.1 (Latest)
363
+
364
+ - **🎉 Enhanced OAuth Provider Support**: Added Microsoft, LinkedIn, Spotify, Twitch, Slack, and Notion OAuth providers
365
+ - **🔧 Improved TypeScript Types**: Complete rewrite of User interface with detailed profile fields, metadata support, and extended authentication state tracking
366
+ - **✨ Enhanced User Experience**: Better OAuth provider UI with proper branding, icons, and colors for all supported providers
367
+ - **📚 Comprehensive Role Support**: Extended UserRole type with additional built-in roles (owner, editor, viewer, contributor, manager, developer, analyst, support)
368
+ - **💪 Backward Compatibility**: All changes are non-destructive and maintain full backward compatibility
369
+
370
+ ### v1.0.0
371
+
372
+ - **Major Release**: Production-ready authentication package
373
+ - Complete feature parity between Supabase and Firebase providers
374
+ - Enhanced error handling and user feedback
375
+ - Comprehensive testing and documentation
376
+
377
+ ### v0.4.3
378
+
379
+ - Fixed React hooks usage in auth callbacks
380
+ - Improved error handling and network error detection
381
+ - Added proper auth provider initialization in store
382
+ - Enhanced TypeScript types
383
+
384
+ ### v0.4.0
385
+
386
+ - Complete architecture rewrite
387
+ - Added Firebase support alongside Supabase
388
+ - Implemented provider factory pattern
389
+ - Migrated to Zustand for state management
390
+ - React 19 and Next.js 15 compatibility
391
+
392
+ ### v0.3.x
393
+
394
+ - Initial Supabase-only implementation
395
+ - Basic authentication flows
396
+ - Component-based architecture