@koolbase/react-native 11.0.0 → 11.1.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 +43 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,49 @@ adheres to [Semantic Versioning][semver].
|
|
|
7
7
|
[kac]: https://keepachangelog.com/en/1.1.0/
|
|
8
8
|
[semver]: https://semver.org/
|
|
9
9
|
|
|
10
|
+
## 11.1.0
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Fourteen error codes the API emits were not mapped**, so they arrived as
|
|
15
|
+
a generic error and an app's `instanceof` branch silently never ran. The
|
|
16
|
+
most consequential is `contact_not_verified` — in a project with verified
|
|
17
|
+
contact required, a user who registers, does not click the link, and comes
|
|
18
|
+
back is the *commonest* auth failure there is, and it had no type. Now:
|
|
19
|
+
|
|
20
|
+
| Code | Class |
|
|
21
|
+
|---|---|
|
|
22
|
+
| `contact_not_verified`, `email_not_verified` | `ContactNotVerifiedError` |
|
|
23
|
+
| `signups_disabled` | `SignupsDisabledError` |
|
|
24
|
+
| `weak_password` | `WeakPasswordError` (existed, never mapped from the server) |
|
|
25
|
+
| `account_exists` | `AccountExistsError` |
|
|
26
|
+
| `token_expired` | `TokenExpiredError` |
|
|
27
|
+
| `token_used` | `TokenAlreadyUsedError` |
|
|
28
|
+
| `invalid_token` | `UnlockTokenInvalidError` |
|
|
29
|
+
| `invalid_password` | `CurrentPasswordIncorrectError` |
|
|
30
|
+
| `oauth_only_account` | `OAuthOnlyAccountError` |
|
|
31
|
+
| `unsupported_oauth_provider` | `UnsupportedOAuthProviderError` |
|
|
32
|
+
| `session_required` | `SessionRequiredError` |
|
|
33
|
+
| `insufficient_authority` | `InsufficientAuthorityError` |
|
|
34
|
+
| `last_credential` | `LastCredentialError` |
|
|
35
|
+
| `hide_requires_verification` | `HideRequiresVerificationError` |
|
|
36
|
+
|
|
37
|
+
`CurrentPasswordIncorrectError` is named for the operation rather than the
|
|
38
|
+
code: the server calls it `invalid_password`, which reads like a rejected
|
|
39
|
+
new password and means the opposite.
|
|
40
|
+
|
|
41
|
+
- **`WeakPasswordError` carries the server's message** when there is one. The
|
|
42
|
+
SDK checks length before sending; a project may require more, and "must be
|
|
43
|
+
at least 8 characters" would then be both wrong and unhelpful. Its
|
|
44
|
+
constructor argument is optional, so existing code is unaffected.
|
|
45
|
+
|
|
46
|
+
### Why these were missing
|
|
47
|
+
|
|
48
|
+
Nothing inside the SDK can tell that a code fell through — the generic error
|
|
49
|
+
is a valid object and the app's branch simply does not run. There is now a
|
|
50
|
+
test that asserts every code maps to its own class, so a new code added to the
|
|
51
|
+
API without a case here fails the build rather than a user's password reset.
|
|
52
|
+
|
|
10
53
|
## 11.0.0
|
|
11
54
|
|
|
12
55
|
### Read before upgrading
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/react-native",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "React Native SDK for Koolbase \u2014 auth, database, storage, realtime, feature flags, and functions in one package.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/koolbase/koolbase-react-native"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@koolbase/core": "11.
|
|
27
|
+
"@koolbase/core": "11.1.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-native-async-storage/async-storage": "^3.0.2",
|