@authowl/react-native 0.3.16 → 0.4.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/README.md +9 -1
- package/dist/index.cjs +420 -61
- package/dist/index.d.cts +11 -3
- package/dist/index.d.ts +11 -3
- package/dist/index.js +424 -63
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -72,7 +72,7 @@ catalogs as the web components (`@authowl/core/i18n`) so the wording never
|
|
|
72
72
|
drifts between platforms.
|
|
73
73
|
|
|
74
74
|
```tsx
|
|
75
|
-
import { EmailOtpForm, SignIn, SignUp, SocialButtons } from '@authowl/react-native';
|
|
75
|
+
import { EmailOtpForm, PrivacyCenter, SignIn, SignUp, SocialButtons } from '@authowl/react-native';
|
|
76
76
|
|
|
77
77
|
<SignIn
|
|
78
78
|
onSignedIn={() => router.replace('/home')}
|
|
@@ -81,6 +81,7 @@ import { EmailOtpForm, SignIn, SignUp, SocialButtons } from '@authowl/react-nati
|
|
|
81
81
|
<SignUp onSignedUp={({ sessionCreated }) =>
|
|
82
82
|
router.replace(sessionCreated ? '/home' : '/check-your-email')} />
|
|
83
83
|
<EmailOtpForm onSignedIn={() => router.replace('/home')} />
|
|
84
|
+
<PrivacyCenter />
|
|
84
85
|
```
|
|
85
86
|
|
|
86
87
|
`<SignIn />` reports success **only once a session exists**. A two-factor
|
|
@@ -96,6 +97,12 @@ The provider loads the project's public capabilities once. Built-in screens
|
|
|
96
97
|
hide disabled methods, enforce the configured password length, collect required
|
|
97
98
|
legal consent, and send the accepted consent version automatically.
|
|
98
99
|
|
|
100
|
+
When privacy notices are published, `<SignUp />` presents the exact localized
|
|
101
|
+
versions and records an explicit grant or refusal for every optional purpose.
|
|
102
|
+
Signed-in users can use `<PrivacyCenter />` to change those choices and submit
|
|
103
|
+
data-rights requests. Custom interfaces can call the same typed APIs through
|
|
104
|
+
`usePrivacy()` or `useAuthOwlClient().privacy`.
|
|
105
|
+
|
|
99
106
|
Pass `locale="ar"` to `<AuthOwlProvider>` to render Arabic. It is not
|
|
100
107
|
auto-detected from the device: a phone set to Arabic does not mean the app is
|
|
101
108
|
localized, and switching only the auth screens is worse than defaulting.
|
|
@@ -201,6 +208,7 @@ if (has({ permission: 'org:billing:read' })) return <Billing />;
|
|
|
201
208
|
- `useUser()` - the signed-in user, or `null`
|
|
202
209
|
- `useSession()` - raw session state (`isPending`, `error`, `refetch`)
|
|
203
210
|
- `useAuthOwlClient()` - native-safe sign-in, account, organization, and passkey management actions
|
|
211
|
+
- `usePrivacy()` - typed consent preferences and data-rights actions
|
|
204
212
|
- `useSocialSignIn()` - exchanges a provider-issued ID token for an AuthOwl session
|
|
205
213
|
|
|
206
214
|
## Social sign-in
|