@authon/react 0.3.1 → 0.7.15
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/LICENSE +21 -0
- package/README.ko.md +1 -2
- package/README.md +4 -6
- package/dist/index.cjs +610 -325
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +569 -284
- package/dist/index.js.map +1 -1
- package/package.json +10 -8
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Authon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.ko.md
CHANGED
|
@@ -35,7 +35,7 @@ function App() {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
38
|
-
<AuthonProvider publishableKey="pk_live_..."
|
|
38
|
+
<AuthonProvider publishableKey="pk_live_...">
|
|
39
39
|
<App />
|
|
40
40
|
</AuthonProvider>
|
|
41
41
|
);
|
|
@@ -77,7 +77,6 @@ const { signOut } = useAuthon();
|
|
|
77
77
|
|
|
78
78
|
| 변수 | 필수 | 설명 |
|
|
79
79
|
|------|------|------|
|
|
80
|
-
| `AUTHON_API_URL` | Yes | Authon 서버 URL |
|
|
81
80
|
| `AUTHON_PUBLISHABLE_KEY` | Yes | 프로젝트 퍼블리셔블 키 |
|
|
82
81
|
|
|
83
82
|
## 비교
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# @authon/react
|
|
4
4
|
|
|
5
|
-
> Drop-in React authentication with hooks and components —
|
|
5
|
+
> Drop-in React authentication with hooks and components — Auth0 alternative, open-source auth
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@authon/react)
|
|
8
8
|
[](../../LICENSE)
|
|
@@ -16,8 +16,8 @@ Before installing the SDK, create an Authon project and get your API keys:
|
|
|
16
16
|
- Select the authentication methods you want (Email/Password, OAuth providers, etc.)
|
|
17
17
|
|
|
18
18
|
2. **Get your API keys** from Project Settings → API Keys
|
|
19
|
-
- **Publishable Key** (`pk_live_...`
|
|
20
|
-
- **
|
|
19
|
+
- **Publishable Key** (`pk_live_...`) — use in your frontend code
|
|
20
|
+
- **Test Key** (`pk_test_...`) — for development, enables Dev Teleport
|
|
21
21
|
|
|
22
22
|
3. **Configure OAuth providers** (optional) in Project Settings → OAuth
|
|
23
23
|
- Add Google, Apple, GitHub, etc. with their respective Client ID and Secret
|
|
@@ -60,7 +60,6 @@ function App() {
|
|
|
60
60
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
61
61
|
<AuthonProvider
|
|
62
62
|
publishableKey="pk_live_YOUR_PUBLISHABLE_KEY"
|
|
63
|
-
config={{ apiUrl: 'https://your-authon-server.com' }}
|
|
64
63
|
>
|
|
65
64
|
<App />
|
|
66
65
|
</AuthonProvider>
|
|
@@ -169,8 +168,8 @@ function SignOutButton() {
|
|
|
169
168
|
|
|
170
169
|
| Variable | Required | Description |
|
|
171
170
|
|----------|----------|-------------|
|
|
172
|
-
| `AUTHON_API_URL` | Yes | Your Authon server URL |
|
|
173
171
|
| `AUTHON_PUBLISHABLE_KEY` | Yes | Project publishable key (`pk_live_...` or `pk_test_...`) |
|
|
172
|
+
| `AUTHON_API_URL` | No | Optional — defaults to `api.authon.dev` |
|
|
174
173
|
|
|
175
174
|
## API Reference
|
|
176
175
|
|
|
@@ -207,7 +206,6 @@ function SignOutButton() {
|
|
|
207
206
|
|
|
208
207
|
| Feature | Authon | Clerk | Auth.js |
|
|
209
208
|
|---------|--------|-------|---------|
|
|
210
|
-
| Self-hosted | Yes | No | Partial |
|
|
211
209
|
| Pricing | Free | $25/mo+ | Free |
|
|
212
210
|
| OAuth providers | 10+ | 20+ | 80+ |
|
|
213
211
|
| ShadowDOM modal | Yes | No | No |
|