@onramper/onramper-react-native 1.3.1 → 1.4.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/CHANGELOG.md +55 -0
- package/README.md +15 -0
- package/ios/Frameworks/OnramperSDK.xcframework/Info.plist +5 -5
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/OnramperSDK.framework/OnramperSDK_OnramperSDK.bundle/Info.plist +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +3917 -3562
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/Modules/OnramperSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/OnramperSDK.framework/OnramperSDK_OnramperSDK.bundle/Info.plist +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/DWARF/OnramperSDK +0 -0
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/aarch64/OnramperSDK.yml +3917 -3562
- package/ios/Frameworks/OnramperSDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/OnramperSDK.framework.dSYM/Contents/Resources/Relocations/x86_64/OnramperSDK.yml +3862 -3525
- package/lib/commonjs/OnramperClient.js +3 -0
- package/lib/commonjs/OnramperClient.js.map +1 -1
- package/lib/module/OnramperClient.js +3 -0
- package/lib/module/OnramperClient.js.map +1 -1
- package/lib/typescript/commonjs/src/OnramperClient.d.ts +3 -0
- package/lib/typescript/commonjs/src/OnramperClient.d.ts.map +1 -1
- package/lib/typescript/module/src/OnramperClient.d.ts +3 -0
- package/lib/typescript/module/src/OnramperClient.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/OnramperClient.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,61 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.4.0]
|
|
6
|
+
|
|
7
|
+
Bundles `OnramperSDK@1.4.0` from its published, checksum-verified release.
|
|
8
|
+
|
|
9
|
+
Most changes in this release come from
|
|
10
|
+
[OnramperSDK for iOS 1.4.0](https://github.com/onramper/onramper-ios/releases/tag/v1.4.0).
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Trusted partner login.** If your backend has already verified the user's
|
|
15
|
+
email, add `user: { email }` to the signed `client-sessions` request. On Buy,
|
|
16
|
+
the user is signed in to OnramperID without the email OTP:
|
|
17
|
+
- **Best case:** no login UI at all — the user goes straight to the payment sheet.
|
|
18
|
+
- **Profile fields missing:** only the OnramperID "additional info" form
|
|
19
|
+
appears. There is no OTP screen and no "Grant permission" screen.
|
|
20
|
+
- If an OnramperID account already exists for that email, the user is signed
|
|
21
|
+
in to it; otherwise one is created with the email marked verified.
|
|
22
|
+
|
|
23
|
+
When `user` is sent, the session response also carries
|
|
24
|
+
`trustedLogin: "bound" | "unavailable"`. Trusted login is enabled per
|
|
25
|
+
integration — talk to your Onramper contact. Until it is, every session
|
|
26
|
+
reports `"unavailable"` and sign-in stays the normal OTP flow. It never blocks
|
|
27
|
+
sign-in: on any failure the normal OnramperID sign-in appears, with no error to
|
|
28
|
+
handle. No JavaScript API changed. See
|
|
29
|
+
[Backend session endpoint](docs/BACKEND_SESSION_ENDPOINT.md#trusted-partner-login).
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- `signOut()` also clears the OnramperID web session (no "continue as" the
|
|
34
|
+
previous user), closes an open login sheet without reporting an error, and
|
|
35
|
+
turns trusted login off for that client.
|
|
36
|
+
- When login is needed, the Buy button spins briefly while the SDK checks for a
|
|
37
|
+
trusted login, then the login sheet appears. With a trusted login, the sheet is
|
|
38
|
+
already presented but invisible while the button spins (up to ~15s): your
|
|
39
|
+
screen stays interactive, but it can't present its own modal until the login
|
|
40
|
+
sheet appears or closes.
|
|
41
|
+
- If the OnramperID page can't load, the login sheet shows **Retry** and
|
|
42
|
+
**Close** instead of staying blank. If OnramperID ends sign-in with an error,
|
|
43
|
+
the sheet closes and Buy is tappable again. A stalled sign-in now fails after
|
|
44
|
+
15 seconds instead of leaving the Buy button spinning.
|
|
45
|
+
- The bare RN demo's Settings screen has a **Trusted partner login** email field
|
|
46
|
+
that re-mints the demo session with `user.email` and re-creates the client.
|
|
47
|
+
The Expo demo has the same field under Credentials, applied on the next
|
|
48
|
+
**Configure + Initialize**.
|
|
49
|
+
|
|
50
|
+
### Upgrading from 1.3.1
|
|
51
|
+
|
|
52
|
+
- No existing call sites need to change. Run `pod install` and rebuild the native
|
|
53
|
+
app after updating the package.
|
|
54
|
+
- **When your app's signed-in user changes:** call `signOut()`, then `destroy()`
|
|
55
|
+
the client and create and initialize a new `OnramperClient` with a session
|
|
56
|
+
minted for the new user's `user.email`. Without `signOut()`, an existing
|
|
57
|
+
OnramperID login on the device wins and the next checkout reuses the previous
|
|
58
|
+
user's account.
|
|
59
|
+
|
|
5
60
|
## [1.3.1]
|
|
6
61
|
|
|
7
62
|
Bundles `OnramperSDK@1.3.1` from its published, checksum-verified release.
|
package/README.md
CHANGED
|
@@ -135,6 +135,21 @@ to start again; calling `initialize()` on a destroyed instance does not revive i
|
|
|
135
135
|
These rules release local prepared views; they do not cancel an already submitted
|
|
136
136
|
payment or guarantee cancellation of a request already sent to the backend.
|
|
137
137
|
|
|
138
|
+
When your app's signed-in user changes, call `signOut()`, then `destroy()` the
|
|
139
|
+
client and create and initialize a new `OnramperClient` with a session minted for
|
|
140
|
+
the new user. Without `signOut()`, an existing OnramperID login on the device wins
|
|
141
|
+
and the next checkout reuses the previous user's account.
|
|
142
|
+
|
|
143
|
+
## Trusted partner login
|
|
144
|
+
|
|
145
|
+
If your backend has already verified the user's email, add `user: { email }` to
|
|
146
|
+
its signed `client-sessions` request. On Buy, the user is signed in to OnramperID
|
|
147
|
+
without the email OTP — with no login UI at all, or only the "additional info"
|
|
148
|
+
form when profile fields are missing. No JavaScript changes are needed; it is
|
|
149
|
+
enabled per integration by Onramper and falls back to the normal OTP sign-in on
|
|
150
|
+
any failure. Available with RN package 1.4.0 or newer. See
|
|
151
|
+
[Backend session endpoint](docs/BACKEND_SESSION_ENDPOINT.md#trusted-partner-login).
|
|
152
|
+
|
|
138
153
|
## Diagnostic logs
|
|
139
154
|
|
|
140
155
|
Pass `logLevel: 'info'` (or `'debug'`) and `logHandler: record => yourStore.append(record)`
|
|
@@ -10,15 +10,18 @@
|
|
|
10
10
|
<key>DebugSymbolsPath</key>
|
|
11
11
|
<string>dSYMs</string>
|
|
12
12
|
<key>LibraryIdentifier</key>
|
|
13
|
-
<string>ios-
|
|
13
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
14
14
|
<key>LibraryPath</key>
|
|
15
15
|
<string>OnramperSDK.framework</string>
|
|
16
16
|
<key>SupportedArchitectures</key>
|
|
17
17
|
<array>
|
|
18
18
|
<string>arm64</string>
|
|
19
|
+
<string>x86_64</string>
|
|
19
20
|
</array>
|
|
20
21
|
<key>SupportedPlatform</key>
|
|
21
22
|
<string>ios</string>
|
|
23
|
+
<key>SupportedPlatformVariant</key>
|
|
24
|
+
<string>simulator</string>
|
|
22
25
|
</dict>
|
|
23
26
|
<dict>
|
|
24
27
|
<key>BinaryPath</key>
|
|
@@ -26,18 +29,15 @@
|
|
|
26
29
|
<key>DebugSymbolsPath</key>
|
|
27
30
|
<string>dSYMs</string>
|
|
28
31
|
<key>LibraryIdentifier</key>
|
|
29
|
-
<string>ios-
|
|
32
|
+
<string>ios-arm64</string>
|
|
30
33
|
<key>LibraryPath</key>
|
|
31
34
|
<string>OnramperSDK.framework</string>
|
|
32
35
|
<key>SupportedArchitectures</key>
|
|
33
36
|
<array>
|
|
34
37
|
<string>arm64</string>
|
|
35
|
-
<string>x86_64</string>
|
|
36
38
|
</array>
|
|
37
39
|
<key>SupportedPlatform</key>
|
|
38
40
|
<string>ios</string>
|
|
39
|
-
<key>SupportedPlatformVariant</key>
|
|
40
|
-
<string>simulator</string>
|
|
41
41
|
</dict>
|
|
42
42
|
</array>
|
|
43
43
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|