@techfinityedge/koolbase-react-native 1.10.0 → 1.10.1

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
@@ -12,15 +12,13 @@ Auth, database, storage, realtime, functions, feature flags, remote config, vers
12
12
  ## Get started in 2 minutes
13
13
 
14
14
  1. Create a free account at [app.koolbase.com](https://app.koolbase.com)
15
-
16
15
  2. Create a project and copy your public key from Environments
17
-
18
16
  3. Add the SDK:
19
17
 
20
18
  ```bash
21
- npm install @techfinityedge/koolbase-react-native@^1.8.0
19
+ npm install @techfinityedge/koolbase-react-native@^1.10.0
22
20
  # or
23
- yarn add @techfinityedge/koolbase-react-native@^1.8.0
21
+ yarn add @techfinityedge/koolbase-react-native@^1.10.0
24
22
  ```
25
23
 
26
24
  **4. Initialize at app startup:**
@@ -40,7 +38,7 @@ That's it. Every feature below is now available via `Koolbase.*`.
40
38
 
41
39
  ## Authentication
42
40
 
43
- Email + password, Google, Apple, and phone + OTP — out of the box.
41
+ Email + password, Apple Sign-In, and phone + OTP — out of the box.
44
42
 
45
43
  ```typescript
46
44
  // Register
@@ -57,30 +55,41 @@ await Koolbase.auth.logout();
57
55
 
58
56
  // Password reset
59
57
  await Koolbase.auth.forgotPassword('user@example.com');
58
+
59
+ // Listen to auth state changes (fires immediately with current state)
60
+ const unsubscribe = Koolbase.auth.onAuthStateChange((user) => {
61
+ console.log(user ? 'signed in' : 'signed out');
62
+ });
60
63
  ```
61
64
 
62
- ### OAuth — Google & Apple
65
+ ### OAuth — Apple
66
+
67
+ Apple Sign-In uses the native authentication flow via `@invertase/react-native-apple-authentication` as a peer dependency:
63
68
 
64
69
  ```typescript
65
- // Google
66
- await Koolbase.auth.signInWithGoogle({ idToken: googleIdToken });
67
- ```
70
+ import appleAuth from '@invertase/react-native-apple-authentication';
71
+ import { Koolbase } from '@techfinityedge/koolbase-react-native';
68
72
 
69
- Apple uses the native authentication flow via `@invertase/react-native-apple-authentication` as a peer dependency:
73
+ const response = await appleAuth.performRequest({
74
+ requestedOperation: appleAuth.Operation.LOGIN,
75
+ requestedScopes: [appleAuth.Scope.EMAIL, appleAuth.Scope.FULL_NAME],
76
+ });
70
77
 
71
- ```typescript
72
- import { KoolbaseAppleAuth } from '@techfinityedge/koolbase-react-native';
73
- import { appleAuth } from '@invertase/react-native-apple-authentication';
74
-
75
- const session = await KoolbaseAppleAuth.signIn(async () => {
76
- return await appleAuth.performRequest({
77
- requestedOperation: appleAuth.Operation.LOGIN,
78
- requestedScopes: [appleAuth.Scope.EMAIL, appleAuth.Scope.FULL_NAME],
79
- });
78
+ const session = await Koolbase.auth.signInWithApple({
79
+ identityToken: response.identityToken!,
80
+ nonce: response.nonce,
81
+ fullName: response.fullName
82
+ ? {
83
+ givenName: response.fullName.givenName ?? undefined,
84
+ familyName: response.fullName.familyName ?? undefined,
85
+ }
86
+ : undefined,
80
87
  });
81
88
  ```
82
89
 
83
- Full setup guide at [docs.koolbase.com/auth/oauth](https://docs.koolbase.com/auth/oauth).
90
+ Before users can sign in, configure Apple Sign-In for your environment with your iOS app's Bundle ID. Full setup guide at [docs.koolbase.com/auth/oauth](https://docs.koolbase.com/auth/oauth).
91
+
92
+ > **Google Sign-In** — coming in v1.11.0.
84
93
 
85
94
  ### Phone + OTP
86
95
 
@@ -150,6 +159,7 @@ const { url } = await Koolbase.storage.upload({
150
159
  });
151
160
 
152
161
  const downloadUrl = await Koolbase.storage.getDownloadUrl('avatars', `user-${userId}.jpg`);
162
+
153
163
  await Koolbase.storage.delete('avatars', `user-${userId}.jpg`);
154
164
  ```
155
165
 
@@ -177,11 +187,10 @@ Invoke deployed serverless functions. When a user is signed in via `Koolbase.aut
177
187
  const result = await Koolbase.functions.invoke('send-welcome-email', {
178
188
  userId: '123',
179
189
  });
180
-
181
190
  if (result.success) console.log(result.data);
182
191
  ```
183
192
 
184
- Inside the function (Deno runtime), read the caller:
193
+ Inside the function, read the caller:
185
194
 
186
195
  ```typescript
187
196
  export async function handler(ctx) {
@@ -325,20 +334,18 @@ await Koolbase.messaging.send({
325
334
 
326
335
  ## What's included
327
336
 
328
- | Feature | Koolbase | Firebase | Supabase |
329
- | --- | --- | --- | --- |
330
- | TypeScript SDK | Yes | Yes | Yes |
331
- | Feature flags | Yes | — | — |
332
- | Remote config | Yes | Yes | — |
333
- | Version enforcement | Yes | — | — |
334
- | Offline-first database | Yes | Yes | — |
335
- | Code push | Yes | | |
336
- | Logic engine (flows OTA) | Yes | — | — |
337
- | Analytics | Yes | Yes | — |
338
- | Cloud Messaging | Yes | Yes | — |
339
- | Sign in with Apple | Yes | Yes | Yes |
340
- | Phone + OTP | Yes | Yes | Yes |
341
- | Authenticated functions (`ctx.auth`) | Yes | Yes | Yes |
337
+ - Authentication: email + password, Apple Sign-In, phone + OTP
338
+ - Database with offline-first cache, realtime subscriptions, and populate
339
+ - Storage with download URLs
340
+ - Realtime subscriptions over WebSocket
341
+ - Authenticated functions (`ctx.auth` exposes the caller automatically)
342
+ - Feature flags and remote config
343
+ - Version enforcement
344
+ - Code push (config + flag overrides + directives, no store release)
345
+ - Logic engine (conditional flows as data, updatable OTA)
346
+ - Analytics (DAU/WAU/MAU, funnels, retention)
347
+ - Cloud Messaging (FCM token registration, targeted send, broadcast)
348
+ - TypeScript-native with full type definitions
342
349
 
343
350
  ---
344
351
 
@@ -4,7 +4,7 @@
4
4
  * version-conditional logic (deprecation warnings, schema migrations,
5
5
  * feature flags). Must match the `version` field in package.json.
6
6
  */
7
- export declare const koolbaseSdkVersion = "1.10.0";
7
+ export declare const koolbaseSdkVersion = "1.10.1";
8
8
  /**
9
9
  * Builds device-identifying headers attached to every Koolbase auth
10
10
  * request. Mirrors the Flutter SDK's `DeviceMetadata` for parity. Apps
@@ -9,7 +9,7 @@ const auth_storage_1 = require("./auth-storage");
9
9
  * version-conditional logic (deprecation warnings, schema migrations,
10
10
  * feature flags). Must match the `version` field in package.json.
11
11
  */
12
- exports.koolbaseSdkVersion = '1.10.0';
12
+ exports.koolbaseSdkVersion = '1.10.1';
13
13
  /**
14
14
  * Generate a UUIDv4-shaped string for use as a stable per-install
15
15
  * device label. Not cryptographically secure — this is a label, not a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techfinityedge/koolbase-react-native",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "React Native SDK for Koolbase \u2014 auth, database, storage, realtime, feature flags, and functions in one package.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",