@livx.cc/native-kit 0.25.0 → 0.26.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/package.json +1 -1
- package/src/modules/oauth.ts +8 -2
- package/src/modules/reviews.ts +3 -1
package/package.json
CHANGED
package/src/modules/oauth.ts
CHANGED
|
@@ -17,7 +17,10 @@ export interface OAuthResult {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
* System-browser OAuth
|
|
20
|
+
* System-browser OAuth — iOS ASWebAuthenticationSession / Android Chrome Custom Tabs. The Android
|
|
21
|
+
* tab returns the provider redirect via the app's urlScheme deep-link path (it doesn't auto-close
|
|
22
|
+
* like iOS); the shell matches the callbackScheme and resolves with the same { url } shape. A
|
|
23
|
+
* user-dismissed tab/sheet rejects with code 'CANCELLED'. Provider-agnostic by design — the same
|
|
21
24
|
* philosophy as `kit.push`: the shell owns only the device-side primitive (run the auth handshake in
|
|
22
25
|
* the OS-shared, policy-compliant browser), while the PWA builds the auth URL and does token exchange.
|
|
23
26
|
*
|
|
@@ -36,6 +39,9 @@ export class OAuthModule {
|
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
authorize(params: OAuthAuthorizeParams): Promise<OAuthResult> {
|
|
39
|
-
|
|
42
|
+
// Long timeout: a real sign-in (password + 2FA + consent in the system browser) easily exceeds
|
|
43
|
+
// the 10s invoke default — without this the kit abandons the request id before the redirect
|
|
44
|
+
// returns and the login is silently dropped. Matches the other interactive flows (pickers 120s).
|
|
45
|
+
return this.kit.invoke('oauth.authorize', params as unknown as Record<string, unknown>, { timeoutMs: 300_000 });
|
|
40
46
|
}
|
|
41
47
|
}
|
package/src/modules/reviews.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { NativeKit } from '../core/NativeKit';
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/** In-app store review prompt — iOS SKStoreReviewController / Android Play In-App Review (opt-in
|
|
4
|
+
* `reviews` module). The OS rate-limits display; on Android it only surfaces for a Play-Store-track
|
|
5
|
+
* install (a sideload/emulator no-ops without showing UI). Fire-and-forget either way. */
|
|
4
6
|
export class ReviewsModule {
|
|
5
7
|
constructor(private kit: NativeKit) {}
|
|
6
8
|
|