You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Authorizer React SDK allows you to implement authentication in your [React](https://reactjs.org/) application quickly. It also allows you to access the user profile.
4
-
5
-
Here is a quick guide on getting started with `@authorizerdev/authorizer-react` package.
3
+
React SDK for [authorizer.dev](https://authorizer.dev). Adds authentication to your [React](https://reactjs.org/) application in minutes. Current version: **2.1.0**.
|`is_mobile_basic_authentication_enabled`|`boolean`| Mobile (phone number + password) authentication |
114
+
|`is_phone_verification_enabled`|`boolean`| Phone number OTP verification |
115
+
116
+
These fields are populated automatically from the server's `/api/meta` response when `AuthorizerProvider` mounts.
117
+
118
+
---
119
+
120
+
## Local Development
112
121
113
122
```bash
114
-
npm start # or yarn start
115
-
```
116
-
117
-
This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
118
-
119
-
Then run either Storybook or the example playground:
120
-
121
-
### Example
123
+
# Build in watch mode
124
+
npm start
122
125
123
-
Then run the example inside another:
124
-
125
-
```bash
126
+
# Run the example app in another terminal
126
127
cd example
127
-
npm i # or yarn to install dependencies
128
-
npm start # or yarn start
129
-
```
130
-
131
-
The default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**, we use [Parcel's aliasing](https://parceljs.org/module_resolution.html#aliases).
132
-
133
-
To do a one-off build, use `npm run build` or `yarn build`.
134
-
135
-
To run tests, use `npm test` or `yarn test`.
128
+
npm i
129
+
npm start
136
130
137
-
## Configuration
131
+
# One-off build
132
+
npm run build
138
133
139
-
Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
134
+
# Tests
135
+
npm test
140
136
141
-
### Storybook commands
142
-
143
-
```bash
137
+
# Storybook
144
138
npm run storybook
145
-
```
146
-
147
-
```bash
148
139
npm run build-storybook
140
+
141
+
# Bundle analysis
142
+
npm run size
143
+
npm run analyze
149
144
```
150
145
151
-
### Jest
146
+
---
152
147
153
-
Jest tests are set up to run with `npm test` or `yarn test`.
148
+
## Release
154
149
155
-
### Bundle analysis
150
+
1. Bump the version in `package.json`.
151
+
2. Tag the commit: `git tag v<version>`
152
+
3. Push with tags: `git push origin main --tags`
156
153
157
-
Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size`and visulize it with `npm run analyze`.
154
+
The GitHub Actions release workflow handles npm publish and GitHub Release creation automatically.
0 commit comments