@springmicro/auth 0.6.4 → 0.7.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/.eslintrc.cjs +18 -18
- package/README.md +60 -60
- package/dist/{Index-64ac63ff-BZqOq8A-.js → Index-64ac63ff-ChMmeIY7.js} +1 -1
- package/dist/{Index-6c094240-MY1bN_-H.js → Index-6c094240-hn_S7Xeg.js} +1 -1
- package/dist/{Web3Auth-BZvmXZfr.js → Web3Auth-CGD96zai.js} +13692 -15050
- package/dist/alphawallet-B7eovdf-.js +0 -0
- package/dist/apexwallet-ysP20G9D.js +0 -0
- package/dist/atoken-BBnNTzcz.js +0 -0
- package/dist/bifrostwallet-CNNBO92h.js +0 -0
- package/dist/binance-DvPgAzCw.js +0 -0
- package/dist/bitget-DZOUrwgy.js +0 -0
- package/dist/bitpie-C_uxmEzw.js +0 -0
- package/dist/bitski-DpzkHNkv.js +0 -0
- package/dist/blockwallet-BL69cqkA.js +0 -0
- package/dist/brave-DnRzMQYW.js +0 -0
- package/dist/ccip-c78d2f16-DLcRlwod.js +0 -0
- package/dist/coin98wallet-CkFdOvXt.js +0 -0
- package/dist/coinbase-CaGNx5if.js +0 -0
- package/dist/core-9rK8tWud.js +0 -0
- package/dist/defiwallet-0AsgJBSy.js +0 -0
- package/dist/detected-CX_JZaUk.js +0 -0
- package/dist/echooo-CmaetT_Z.js +0 -0
- package/dist/enkrypt-BibtwvK7.js +0 -0
- package/dist/exodus-BxzkDWWP.js +0 -0
- package/dist/fordefi-CvKyVwhI.js +0 -0
- package/dist/foxwallet-D7c_LDTf.js +0 -0
- package/dist/frame-CDfNmjUy.js +0 -0
- package/dist/frontier-DqKNSj2z.js +0 -0
- package/dist/{hashMessage-DXQQ5wqb.js → hashMessage-Bdgmx0rg.js} +1 -1
- package/dist/huobiwallet-CxSwqa5L.js +0 -0
- package/dist/hyperpay-nmHE3WqM.js +0 -0
- package/dist/icon-2Zqy7pqQ.js +0 -0
- package/dist/icon-CGWI1Ies.js +0 -0
- package/dist/icon-C_O4nprO.js +0 -0
- package/dist/icon-DbgmZCnU.js +0 -0
- package/dist/icon-Dbjb6jc5.js +0 -0
- package/dist/icon-cAd7RhSC.js +0 -0
- package/dist/imtoken-yENtOTS3.js +0 -0
- package/dist/index-021f6a62-Zz543EDB.js +0 -0
- package/dist/index-40a497ea-Bn2mC0r7.js +0 -0
- package/dist/{index-BMS1BfQU.js → index-62liFLUM.js} +4 -4
- package/dist/{index-BwFS5ERT.js → index-BBx_mvyX.js} +1 -1
- package/dist/{index-CPg63-IP.js → index-C6leUA25.js} +2 -2
- package/dist/{index-CHbx8A-C.js → index-CAVvArYp.js} +2 -2
- package/dist/{index-wK6pELVV.js → index-Ct7cFdFm.js} +2 -2
- package/dist/{index-BcAl576H.js → index-DA32_Pfh.js} +770 -752
- package/dist/{index-D1pMMcC-.js → index-Dna0rycp.js} +1 -1
- package/dist/index.d.ts +0 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +264 -273
- package/dist/infinitywallet-C8J4FUYw.js +0 -0
- package/dist/kayros-AIrUK1za.js +0 -0
- package/dist/keplr-CyLTca9B.js +0 -0
- package/dist/lif3wallet-C5D6r8pg.js +0 -0
- package/dist/liquality-nbCtErVq.js +0 -0
- package/dist/mathwallet-CWkivCXo.js +0 -0
- package/dist/meetone-kKmvI8md.js +0 -0
- package/dist/metamask-BN7yiDV1.js +0 -0
- package/dist/mykey-CQZ6UcLH.js +0 -0
- package/dist/native-FDN9oNjc.js +0 -0
- package/dist/{number-D6mr0b-k.js → number-C-98SESp.js} +1 -1
- package/dist/okxwallet-CJLVogh2.js +0 -0
- package/dist/oneInch-CciyZ4Pz.js +0 -0
- package/dist/onekey-Dal8kYjU.js +0 -0
- package/dist/opera-DnKg-TJU.js +0 -0
- package/dist/ownbit-BshJUVuW.js +0 -0
- package/dist/phantom-CJ8dIcov.js +0 -0
- package/dist/rabby-D4thTcd6.js +0 -0
- package/dist/rainbow-mXld6yWV.js +0 -0
- package/dist/roninwallet-ZyYrd-D1.js +0 -0
- package/dist/safeheron-Eg1Jb29V.js +0 -0
- package/dist/safepal-DVIKy94N.js +0 -0
- package/dist/sequence-BS2IbtDg.js +0 -0
- package/dist/stablewallet-jyB079Wb.js +0 -0
- package/dist/status-FrAvQjfn.js +0 -0
- package/dist/subwallet-DMvFqKyY.js +0 -0
- package/dist/talisman-Bp8zUXqB.js +0 -0
- package/dist/tallywallet-B4OS9nIr.js +0 -0
- package/dist/tokenary-C7jjcbQa.js +0 -0
- package/dist/tokenpocket-9ZRPmAFA.js +0 -0
- package/dist/tp-V2em5bdl.js +0 -0
- package/dist/transactionRequest-be6a8ea9-CUKWo5mx.js +0 -0
- package/dist/trust-SgHubMq7.js +0 -0
- package/dist/xdefi-COVIyGz4.js +0 -0
- package/dist/zeal-DxHbDqm0.js +0 -0
- package/dist/zerion-BfW0UElc.js +0 -0
- package/dist/zodiacpilot-CrId6F4w.js +0 -0
- package/index.html +13 -13
- package/package.json +2 -2
- package/src/auth/config.ts +0 -0
- package/src/components/SignUp.tsx +0 -0
- package/src/components/forms/AgreementModal.tsx +88 -88
- package/src/components/forms/CaptchaController.tsx +94 -94
- package/src/components/forms/CaptchaModal.jsx +171 -171
- package/src/components/forms/CaptchaWidget.jsx +146 -146
- package/src/components/forms/PasswordChecker.ts +88 -88
- package/src/components/forms/SendCodeInput.tsx +0 -0
- package/src/components/forms/SignUpFormItem.tsx +0 -0
- package/src/components/forms/util/application-api.ts +0 -0
- package/src/components/forms/util/auth-api.ts +198 -198
- package/src/components/forms/util/auth-util.tsx +346 -346
- package/src/components/forms/util/core.ts +493 -493
- package/src/components/forms/util/invitation-api.ts +132 -132
- package/src/components/forms/util/provider.tsx +603 -603
- package/src/components/forms/util/user-api.ts +0 -0
- package/src/components/provider/AdfsLoginButton.jsx +38 -38
- package/src/components/provider/AlipayLoginButton.jsx +38 -38
- package/src/components/provider/AppleLoginButton.jsx +38 -38
- package/src/components/provider/AzureADB2CLoginButton.jsx +38 -38
- package/src/components/provider/AzureADLoginButton.jsx +38 -38
- package/src/components/provider/BaiduLoginButton.jsx +38 -38
- package/src/components/provider/BilibiliLoginButton.jsx +37 -37
- package/src/components/provider/CasdoorLoginButton.jsx +38 -38
- package/src/components/provider/DingTalkLoginButton.jsx +37 -37
- package/src/components/provider/DouyinLoginButton.jsx +38 -38
- package/src/components/provider/FacebookLoginButton.jsx +37 -37
- package/src/components/provider/GitHubLoginButton.jsx +37 -37
- package/src/components/provider/GitLabLoginButton.jsx +38 -38
- package/src/components/provider/GiteeLoginButton.jsx +34 -34
- package/src/components/provider/GoogleLoginButton.jsx +68 -68
- package/src/components/provider/InfoflowLoginButton.jsx +38 -38
- package/src/components/provider/LarkLoginButton.jsx +38 -38
- package/src/components/provider/LinkedInLoginButton.jsx +37 -37
- package/src/components/provider/LoginButton.jsx +33 -33
- package/src/components/provider/OktaLoginButton.jsx +38 -38
- package/src/components/provider/Provider.jsx +3 -3
- package/src/components/provider/ProviderButton.jsx +327 -327
- package/src/components/provider/QqLoginButton.jsx +31 -31
- package/src/components/provider/SelfLoginButton.jsx +47 -47
- package/src/components/provider/SlackLoginButton.jsx +38 -38
- package/src/components/provider/SteamLoginButton.jsx +38 -38
- package/src/components/provider/WeComLoginButton.jsx +34 -34
- package/src/components/provider/Web3Auth.jsx +365 -365
- package/src/components/provider/WechatLoginButton.jsx +37 -37
- package/src/components/provider/WeiboLoginButton.jsx +34 -34
- package/src/components/util.tsx +0 -0
- package/src/i18n/en/signup.json +48 -48
- package/src/i18n/index.ts +17 -17
- package/src/index.tsx +0 -0
- package/src/vite-env.d.ts +1 -1
- package/tsconfig.json +23 -23
- package/tsconfig.node.json +10 -10
- package/vite.config.ts +33 -33
- package/springmicro-auth-0.6.1.tgz +0 -0
package/.eslintrc.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: { browser: true, es2020: true },
|
|
4
|
-
extends: [
|
|
5
|
-
'eslint:recommended',
|
|
6
|
-
'plugin:@typescript-eslint/recommended',
|
|
7
|
-
'plugin:react-hooks/recommended',
|
|
8
|
-
],
|
|
9
|
-
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
|
10
|
-
parser: '@typescript-eslint/parser',
|
|
11
|
-
plugins: ['react-refresh'],
|
|
12
|
-
rules: {
|
|
13
|
-
'react-refresh/only-export-components': [
|
|
14
|
-
'warn',
|
|
15
|
-
{ allowConstantExport: true },
|
|
16
|
-
],
|
|
17
|
-
},
|
|
18
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: { browser: true, es2020: true },
|
|
4
|
+
extends: [
|
|
5
|
+
'eslint:recommended',
|
|
6
|
+
'plugin:@typescript-eslint/recommended',
|
|
7
|
+
'plugin:react-hooks/recommended',
|
|
8
|
+
],
|
|
9
|
+
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
|
10
|
+
parser: '@typescript-eslint/parser',
|
|
11
|
+
plugins: ['react-refresh'],
|
|
12
|
+
rules: {
|
|
13
|
+
'react-refresh/only-export-components': [
|
|
14
|
+
'warn',
|
|
15
|
+
{ allowConstantExport: true },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
}
|
package/README.md
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
# @springmicro/auth
|
|
2
|
-
|
|
3
|
-
Auth config supplied for connecting with a Casdoor instance. Uses [auth-astro](https://github.com/nowaythatworked/auth-astro).
|
|
4
|
-
|
|
5
|
-
## Usage
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm i -g @springmicro/cli
|
|
9
|
-
springmicro add auth
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
```ts
|
|
13
|
-
// auth.config.ts
|
|
14
|
-
|
|
15
|
-
import { getAuthConfig } from "@springmicro/auth";
|
|
16
|
-
|
|
17
|
-
export default getAuthConfig({
|
|
18
|
-
casdoorEndpoint: import.meta.env.PUBLIC_CASDOOR_ENDPOINT,
|
|
19
|
-
clientId: import.meta.env.PUBLIC_CASDOOR_CLIENT_ID,
|
|
20
|
-
clientSecret: import.meta.env.CASDOOR_CLIENT_SECRET,
|
|
21
|
-
});
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
`auth-astro` requires building your site in `server` mode with a platform adapter like `@astrojs/node`.
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
pnpm run astro add node
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
```js
|
|
31
|
-
// astro.config.mjs
|
|
32
|
-
export default defineConfig({
|
|
33
|
-
output: "server",
|
|
34
|
-
adapter: node({
|
|
35
|
-
mode: "standalone",
|
|
36
|
-
}),
|
|
37
|
-
});
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Casdoor
|
|
41
|
-
|
|
42
|
-
In the `application` settings, add the callback URL of `http://yourhost/callback`. Enable auto signin (optional).
|
|
43
|
-
|
|
44
|
-
## Development
|
|
45
|
-
|
|
46
|
-
### Build
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
pnpm run build
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Install in repo (locally)
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
# testing it out in a demo project
|
|
56
|
-
cd astro-demo-project
|
|
57
|
-
pnpm run astro add react
|
|
58
|
-
pnpm run astro add auth-astro
|
|
59
|
-
pnpm add --workspace @springmicro/auth
|
|
60
|
-
```
|
|
1
|
+
# @springmicro/auth
|
|
2
|
+
|
|
3
|
+
Auth config supplied for connecting with a Casdoor instance. Uses [auth-astro](https://github.com/nowaythatworked/auth-astro).
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i -g @springmicro/cli
|
|
9
|
+
springmicro add auth
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
// auth.config.ts
|
|
14
|
+
|
|
15
|
+
import { getAuthConfig } from "@springmicro/auth";
|
|
16
|
+
|
|
17
|
+
export default getAuthConfig({
|
|
18
|
+
casdoorEndpoint: import.meta.env.PUBLIC_CASDOOR_ENDPOINT,
|
|
19
|
+
clientId: import.meta.env.PUBLIC_CASDOOR_CLIENT_ID,
|
|
20
|
+
clientSecret: import.meta.env.CASDOOR_CLIENT_SECRET,
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`auth-astro` requires building your site in `server` mode with a platform adapter like `@astrojs/node`.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pnpm run astro add node
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
// astro.config.mjs
|
|
32
|
+
export default defineConfig({
|
|
33
|
+
output: "server",
|
|
34
|
+
adapter: node({
|
|
35
|
+
mode: "standalone",
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Casdoor
|
|
41
|
+
|
|
42
|
+
In the `application` settings, add the callback URL of `http://yourhost/callback`. Enable auto signin (optional).
|
|
43
|
+
|
|
44
|
+
## Development
|
|
45
|
+
|
|
46
|
+
### Build
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pnpm run build
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Install in repo (locally)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# testing it out in a demo project
|
|
56
|
+
cd astro-demo-project
|
|
57
|
+
pnpm run astro add react
|
|
58
|
+
pnpm run astro add auth-astro
|
|
59
|
+
pnpm add --workspace @springmicro/auth
|
|
60
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Y as I, Z as N, $ as M, a0 as O, am as me, a4 as _, a7 as w, a8 as G, a9 as T, aa as V, ab as C, ac as Y, ad as _e, ae as we, af as D, a1 as h, a3 as m, aA as Ce, ah as H, a2 as L, b7 as W, ai as $, a5 as g, a6 as S, ay as be, bg as ze, bh as Te, bi as je, aD as Le, aU as xe, aG as Pe, aW as Se, aj as F, aO as Z, aR as Re, bj as Ee, bk as ye, aV as Ie, az as Ne, bl as U, bm as B, aw as A, aH as he, an as Me, ao as ge, bn as Oe, ag as ke, bo as X, bp as J, al as E, bq as Q, au as R, aC as K, br as ee, bs as De, bt as te, bu as x, at as He, aX as q, bv as $e } from "./Web3Auth-
|
|
1
|
+
import { Y as I, Z as N, $ as M, a0 as O, am as me, a4 as _, a7 as w, a8 as G, a9 as T, aa as V, ab as C, ac as Y, ad as _e, ae as we, af as D, a1 as h, a3 as m, aA as Ce, ah as H, a2 as L, b7 as W, ai as $, a5 as g, a6 as S, ay as be, bg as ze, bh as Te, bi as je, aD as Le, aU as xe, aG as Pe, aW as Se, aj as F, aO as Z, aR as Re, bj as Ee, bk as ye, aV as Ie, az as Ne, bl as U, bm as B, aw as A, aH as he, an as Me, ao as ge, bn as Oe, ag as ke, bo as X, bp as J, al as E, bq as Q, au as R, aC as K, br as ee, bs as De, bt as te, bu as x, at as He, aX as q, bv as $e } from "./Web3Auth-CGD96zai.js";
|
|
2
2
|
function Fe(i, { from: e, to: t }, n = {}) {
|
|
3
3
|
const o = getComputedStyle(i), a = o.transform === "none" ? "" : o.transform, [f, l] = o.transformOrigin.split(" ").map(parseFloat), s = e.left + e.width * f / t.width - (t.left + f), r = e.top + e.height * l / t.height - (t.top + l), { delay: c = 0, duration: d = (u) => Math.sqrt(u) * 120, easing: v = ye } = n;
|
|
4
4
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as He, J as Ht, K as Bt, L as Dt, M as Wt, N as Nt, O as Et, P as Ft, Q as Ot, R as Zt, T as Rt, U as Gt, V as Ut, W as Xt, X as Yt, Y as pe, Z as ve, $ as me, a0 as he, a1 as h, a2 as z, a3 as p, a4 as M, a5 as c, a6 as Y, a7 as y, a8 as ae, a9 as A, aa as ie, ab as S, ac as te, ad as ye, ae as Ce, af as ee, ag as Jt, ah as F, ai as O, aj as Z, ak as Be, al as R, am as ue, an as Me, ao as qe, ap as $t, aq as De, ar as P, as as be, at as ge, au as L, av as _e, aw as ce, ax as Kt, ay as fe, az as we, aA as At, aB as Qt, aC as j, aD as Ae, aE as We, aF as Ne, aG as Ee, aH as ke, aI as Tt, aJ as xt, aK as en, aL as Ve, aM as ze, aN as Mt, aO as tn, aP as nn, aQ as rn, aR as St, aS as on, aT as de, aU as Ie, aV as $e, aW as ln, aX as je, aY as an, aZ as sn, a_ as It, a$ as Pt, b0 as cn, b1 as dn, b2 as Fe, b3 as un, b4 as Oe, b5 as fn, b6 as Ze, b7 as Pe, b8 as Re, b9 as pn, ba as Le, bb as Ge, bc as vn, bd as mn, be as Ue, bf as hn } from "./Web3Auth-
|
|
1
|
+
import { _ as He, J as Ht, K as Bt, L as Dt, M as Wt, N as Nt, O as Et, P as Ft, Q as Ot, R as Zt, T as Rt, U as Gt, V as Ut, W as Xt, X as Yt, Y as pe, Z as ve, $ as me, a0 as he, a1 as h, a2 as z, a3 as p, a4 as M, a5 as c, a6 as Y, a7 as y, a8 as ae, a9 as A, aa as ie, ab as S, ac as te, ad as ye, ae as Ce, af as ee, ag as Jt, ah as F, ai as O, aj as Z, ak as Be, al as R, am as ue, an as Me, ao as qe, ap as $t, aq as De, ar as P, as as be, at as ge, au as L, av as _e, aw as ce, ax as Kt, ay as fe, az as we, aA as At, aB as Qt, aC as j, aD as Ae, aE as We, aF as Ne, aG as Ee, aH as ke, aI as Tt, aJ as xt, aK as en, aL as Ve, aM as ze, aN as Mt, aO as tn, aP as nn, aQ as rn, aR as St, aS as on, aT as de, aU as Ie, aV as $e, aW as ln, aX as je, aY as an, aZ as sn, a_ as It, a$ as Pt, b0 as cn, b1 as dn, b2 as Fe, b3 as un, b4 as Oe, b5 as fn, b6 as Ze, b7 as Pe, b8 as Re, b9 as pn, ba as Le, bb as Ge, bc as vn, bd as mn, be as Ue, bf as hn } from "./Web3Auth-CGD96zai.js";
|
|
2
2
|
var gn = function(e) {
|
|
3
3
|
He(t, e);
|
|
4
4
|
function t(n, r) {
|