@seamless-auth/react-native 0.3.0 → 0.3.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/CHANGELOG.md +15 -0
- package/README.md +12 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @seamless-auth/react-native
|
|
2
2
|
|
|
3
|
+
## 0.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 59802e2: Add a confirmation step for magic links opened on another device.
|
|
8
|
+
|
|
9
|
+
A magic link opened on a device other than the one that asked for it now waits for the reader to approve it (auth API 0.19.0 and later). The bundled verify screens show which kind of device asked and when, and offer "Yes, sign in that device" or "No, this wasn't me". Approving signs in the requesting device and tells the reader to return to it; declining changes nothing.
|
|
10
|
+
|
|
11
|
+
`@seamless-auth/client` adds `client.confirmMagicLink(token)`, the `getMagicLinkConfirmation`, `isMagicLinkConfirmationRequired`, `describeMagicLinkDevice`, `magicLinkConfirmationPrompt` and `confirmMagicLinkSignIn` helpers, and the `MagicLinkConfirmation` and `MagicLinkDeviceClass` types. In bearer mode the verify call now sends the sign-in's ephemeral token when one is held. A custom verify screen that treats every failure as an invalid link should check `getMagicLinkConfirmation(error)` first.
|
|
12
|
+
|
|
13
|
+
The React Native README describes the new step for apps that handle magic links.
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [59802e2]
|
|
16
|
+
- @seamless-auth/client@0.6.0
|
|
17
|
+
|
|
3
18
|
## 0.3.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -132,9 +132,18 @@ rather than a user agent.
|
|
|
132
132
|
|
|
133
133
|
Request one with `client.requestMagicLink()`, then poll
|
|
134
134
|
`client.checkMagicLink()` every few seconds; the poll returns the session once
|
|
135
|
-
the link has been
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
the link has been used. If the app also receives the link as a universal link,
|
|
136
|
+
call `client.verifyMagicLink(token)` and then `checkMagicLink()`. Bearer mode
|
|
137
|
+
sends the sign-in's ephemeral token with the verify call, which is how the API
|
|
138
|
+
knows this is the device that asked for the link.
|
|
139
|
+
|
|
140
|
+
Opened on any other device, the link is not used until someone there approves
|
|
141
|
+
it: `verifyMagicLink` fails with an error `getMagicLinkConfirmation(error)`
|
|
142
|
+
recognises, carrying the requesting device's platform and request time
|
|
143
|
+
(`magicLinkConfirmationPrompt(held)` phrases both). If the app handles links it
|
|
144
|
+
did not ask for, show that and call `confirmMagicLinkSignIn({ client, token })`
|
|
145
|
+
only when the person agrees. The requesting device is then signed in by its
|
|
146
|
+
poll, and this one is not.
|
|
138
147
|
|
|
139
148
|
### OAuth
|
|
140
149
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamless-auth/react-native",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Headless React Native binding for Seamless Auth: provider, hooks, and the native ports for passkeys, secure token storage, and in-app browser OAuth.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react": "^18.0.0 || ^19.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@seamless-auth/client": "^0.
|
|
48
|
+
"@seamless-auth/client": "^0.6.0",
|
|
49
49
|
"@seamless-auth/types": "^0.28.0"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false
|