@seamless-auth/react-native 0.3.2 → 0.3.3

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @seamless-auth/react-native
2
2
 
3
+ ## 0.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - f21867d: OAuth sign-in now carries the state binding the auth server returns from `POST /oauth/:providerId/start` back to the callback. The session actions `startOAuthLogin` and `finishOAuthLogin` (and so `useAuth()` in React and React Native, and the Angular, Vue and Svelte bindings) store the binding with its state, attach it to the matching callback, and clear it afterwards, so apps that call these actions directly need no code change. The binding is kept in `sessionStorage` under `seamless:oauth:binding` in a browser and in memory elsewhere, and is never sent to the provider or put in a URL. `startOAuthSignIn` passes it explicitly when an in-app browser hands the callback back, and now refuses a callback whose state is not the one it started.
8
+
9
+ `StartOAuthLoginResult` gains an optional `binding` and `FinishOAuthLoginInput` an optional `binding`. Older auth servers return no binding and are unaffected. Auth API 0.19.x with fells-code/seamless-auth-api#463 refuses a callback without the binding, so upgrade this SDK before or with that API release.
10
+
11
+ - Updated dependencies [f21867d]
12
+ - @seamless-auth/client@0.7.1
13
+
3
14
  ## 0.3.2
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -153,6 +153,13 @@ it with `ports.oauthRedirect.open(url, redirectUri)`, which resolves with the
153
153
  callback's `code` and `state`, and finish with `finishOAuthLogin`.
154
154
  `redirectUri` must be registered with the provider and allowed by the auth API.
155
155
 
156
+ Newer auth servers also return a `binding` from `startOAuthLogin` and refuse a
157
+ callback without it. The session actions keep it in memory with its `state` and
158
+ send it from `finishOAuthLogin`, so this needs nothing from you. If you finish
159
+ with another client, pass `binding` yourself, and check that the callback's
160
+ `state` matches the one `startOAuthLogin` returned. Never put the binding in a
161
+ URL or send it to the provider.
162
+
156
163
  ## License
157
164
 
158
165
  Apache-2.0. See [LICENSE](LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamless-auth/react-native",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
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,8 +45,8 @@
45
45
  "react": "^18.0.0 || ^19.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@seamless-auth/client": "^0.7.0",
49
- "@seamless-auth/types": "^0.28.0"
48
+ "@seamless-auth/client": "^0.7.1",
49
+ "@seamless-auth/types": "^0.29.0"
50
50
  },
51
51
  "sideEffects": false
52
52
  }