@aura-stack/auth 0.4.0 → 0.6.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/README.md +36 -1
- package/dist/@types/index.cjs +0 -18
- package/dist/@types/index.d.ts +2 -8
- package/dist/@types/index.js +0 -1
- package/dist/assert-B3iQSYlK.js +3 -0
- package/dist/assert-NJGroSJd.cjs +3 -0
- package/dist/client/index.cjs +1 -0
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.js +1 -0
- package/dist/crypto-Bz8nIciY.js +1 -0
- package/dist/crypto-CoXA5w_4.cjs +1 -0
- package/dist/env-bq387KyP.cjs +1 -0
- package/dist/env-nvh8QBNz.js +1 -0
- package/dist/errors-CCYPHuBO.cjs +1 -0
- package/dist/errors-DFWHOho6.js +1 -0
- package/dist/index-BkpwQ0l4.d.cts +2279 -0
- package/dist/index-nqLV2t91.d.ts +2279 -0
- package/dist/index.cjs +1 -1839
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -35
- package/dist/index.js +1 -132
- package/dist/logger-C59_CDMk.js +1 -0
- package/dist/logger-UnUhYL2V.cjs +1 -0
- package/dist/oauth/atlassian.cjs +1 -0
- package/dist/oauth/atlassian.d.ts +2 -0
- package/dist/oauth/atlassian.js +1 -0
- package/dist/oauth/bitbucket.cjs +1 -49
- package/dist/oauth/bitbucket.d.ts +2 -8
- package/dist/oauth/bitbucket.js +1 -6
- package/dist/oauth/discord.cjs +1 -57
- package/dist/oauth/discord.d.ts +2 -8
- package/dist/oauth/discord.js +1 -6
- package/dist/oauth/dropbox.cjs +1 -0
- package/dist/oauth/dropbox.d.ts +2 -0
- package/dist/oauth/dropbox.js +1 -0
- package/dist/oauth/figma.cjs +1 -49
- package/dist/oauth/figma.d.ts +2 -8
- package/dist/oauth/figma.js +1 -6
- package/dist/oauth/github.cjs +1 -49
- package/dist/oauth/github.d.ts +2 -8
- package/dist/oauth/github.js +1 -6
- package/dist/oauth/gitlab.cjs +1 -49
- package/dist/oauth/gitlab.d.ts +2 -8
- package/dist/oauth/gitlab.js +1 -6
- package/dist/oauth/index.cjs +1 -483
- package/dist/oauth/index.d.ts +2 -8
- package/dist/oauth/index.js +1 -52
- package/dist/oauth/mailchimp.cjs +1 -49
- package/dist/oauth/mailchimp.d.ts +2 -8
- package/dist/oauth/mailchimp.js +1 -6
- package/dist/oauth/notion.cjs +1 -0
- package/dist/oauth/notion.d.ts +2 -0
- package/dist/oauth/notion.js +1 -0
- package/dist/oauth/pinterest.cjs +1 -49
- package/dist/oauth/pinterest.d.ts +2 -8
- package/dist/oauth/pinterest.js +1 -6
- package/dist/oauth/spotify.cjs +1 -49
- package/dist/oauth/spotify.d.ts +2 -8
- package/dist/oauth/spotify.js +1 -6
- package/dist/oauth/strava.cjs +1 -49
- package/dist/oauth/strava.d.ts +2 -8
- package/dist/oauth/strava.js +1 -6
- package/dist/oauth/twitch.cjs +1 -0
- package/dist/oauth/twitch.d.ts +2 -0
- package/dist/oauth/twitch.js +1 -0
- package/dist/oauth/x.cjs +1 -49
- package/dist/oauth/x.d.ts +2 -8
- package/dist/oauth/x.js +1 -6
- package/dist/oauth-BntNm6aE.cjs +1 -0
- package/dist/oauth-DmHy9VrB.js +1 -0
- package/dist/shared/crypto.cjs +1 -0
- package/dist/shared/crypto.d.ts +47 -0
- package/dist/shared/crypto.js +1 -0
- package/dist/shared/identity.cjs +1 -0
- package/dist/shared/identity.d.ts +2 -0
- package/dist/shared/identity.js +1 -0
- package/dist/shared/index.cjs +1 -0
- package/dist/shared/index.d.ts +5 -0
- package/dist/shared/index.js +1 -0
- package/package.json +39 -12
- package/dist/@types/router.d.cjs +0 -1
- package/dist/@types/router.d.d.ts +0 -12
- package/dist/@types/router.d.js +0 -0
- package/dist/@types/utility.cjs +0 -18
- package/dist/@types/utility.d.ts +0 -6
- package/dist/@types/utility.js +0 -1
- package/dist/actions/callback/access-token.cjs +0 -206
- package/dist/actions/callback/access-token.d.ts +0 -29
- package/dist/actions/callback/access-token.js +0 -9
- package/dist/actions/callback/callback.cjs +0 -649
- package/dist/actions/callback/callback.d.ts +0 -13
- package/dist/actions/callback/callback.js +0 -19
- package/dist/actions/callback/userinfo.cjs +0 -250
- package/dist/actions/callback/userinfo.d.ts +0 -21
- package/dist/actions/callback/userinfo.js +0 -14
- package/dist/actions/csrfToken/csrfToken.cjs +0 -197
- package/dist/actions/csrfToken/csrfToken.d.ts +0 -5
- package/dist/actions/csrfToken/csrfToken.js +0 -14
- package/dist/actions/index.cjs +0 -954
- package/dist/actions/index.d.ts +0 -14
- package/dist/actions/index.js +0 -36
- package/dist/actions/session/session.cjs +0 -136
- package/dist/actions/session/session.d.ts +0 -5
- package/dist/actions/session/session.js +0 -10
- package/dist/actions/signIn/authorization.cjs +0 -322
- package/dist/actions/signIn/authorization.d.ts +0 -53
- package/dist/actions/signIn/authorization.js +0 -18
- package/dist/actions/signIn/signIn.cjs +0 -467
- package/dist/actions/signIn/signIn.d.ts +0 -13
- package/dist/actions/signIn/signIn.js +0 -15
- package/dist/actions/signOut/signOut.cjs +0 -493
- package/dist/actions/signOut/signOut.d.ts +0 -8
- package/dist/actions/signOut/signOut.js +0 -16
- package/dist/assert.cjs +0 -161
- package/dist/assert.d.ts +0 -33
- package/dist/assert.js +0 -26
- package/dist/chunk-4EKY7655.js +0 -123
- package/dist/chunk-4MYWAOLG.js +0 -31
- package/dist/chunk-4YHJ4IEQ.js +0 -25
- package/dist/chunk-54CZPKR4.js +0 -25
- package/dist/chunk-5LZ7TOM3.js +0 -25
- package/dist/chunk-5W4BRQYG.js +0 -201
- package/dist/chunk-6MXFPFR3.js +0 -143
- package/dist/chunk-7QF22LHP.js +0 -67
- package/dist/chunk-ALG3GIV4.js +0 -95
- package/dist/chunk-E6G5YCI6.js +0 -25
- package/dist/chunk-EBAMFRB7.js +0 -34
- package/dist/chunk-EEE7UM5T.js +0 -25
- package/dist/chunk-FRJFWTOY.js +0 -70
- package/dist/chunk-FW4W3REU.js +0 -25
- package/dist/chunk-ICAZ4OVS.js +0 -37
- package/dist/chunk-IPKO6UQN.js +0 -25
- package/dist/chunk-ITQ7352M.js +0 -0
- package/dist/chunk-KJBAQZX2.js +0 -92
- package/dist/chunk-KMMAZFSJ.js +0 -25
- package/dist/chunk-LDU7A2JE.js +0 -25
- package/dist/chunk-NUDITUKX.js +0 -73
- package/dist/chunk-OVHNRULD.js +0 -33
- package/dist/chunk-PG7UYFG5.js +0 -0
- package/dist/chunk-PHFH2MGS.js +0 -36
- package/dist/chunk-QQVSRXGX.js +0 -149
- package/dist/chunk-RRLIF4PQ.js +0 -55
- package/dist/chunk-TM5IPSNF.js +0 -113
- package/dist/chunk-TZB6MUXN.js +0 -78
- package/dist/chunk-VNCNJKS2.js +0 -267
- package/dist/chunk-XGLBNXL4.js +0 -75
- package/dist/chunk-XUP6KKNG.js +0 -106
- package/dist/chunk-ZNCZVF6U.js +0 -14
- package/dist/cookie.cjs +0 -246
- package/dist/cookie.d.ts +0 -85
- package/dist/cookie.js +0 -29
- package/dist/env.cjs +0 -56
- package/dist/env.d.ts +0 -7
- package/dist/env.js +0 -6
- package/dist/errors.cjs +0 -85
- package/dist/errors.d.ts +0 -50
- package/dist/errors.js +0 -18
- package/dist/headers.cjs +0 -61
- package/dist/headers.d.ts +0 -33
- package/dist/headers.js +0 -12
- package/dist/index-CSyIJmCM.d.ts +0 -1007
- package/dist/jose.cjs +0 -128
- package/dist/jose.d.ts +0 -25
- package/dist/jose.js +0 -12
- package/dist/logger.cjs +0 -292
- package/dist/logger.d.ts +0 -8
- package/dist/logger.js +0 -8
- package/dist/request.cjs +0 -38
- package/dist/request.d.ts +0 -13
- package/dist/request.js +0 -6
- package/dist/schemas.cjs +0 -125
- package/dist/schemas.d.ts +0 -149
- package/dist/schemas.js +0 -24
- package/dist/secure.cjs +0 -170
- package/dist/secure.d.ts +0 -35
- package/dist/secure.js +0 -19
- package/dist/utils.cjs +0 -223
- package/dist/utils.d.ts +0 -24
- package/dist/utils.js +0 -29
package/dist/oauth/mailchimp.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
mailchimp
|
|
3
|
-
} from "../chunk-LDU7A2JE.js";
|
|
4
|
-
export {
|
|
5
|
-
mailchimp
|
|
6
|
-
};
|
|
1
|
+
const e=e=>({id:`mailchimp`,name:`Mailchimp`,authorize:`https://login.mailchimp.com/oauth2/authorize`,accessToken:`https://login.mailchimp.com/oauth2/token`,userInfo:`https://login.mailchimp.com/oauth2/metadata`,profile:e=>({sub:e.user_id,name:e.accountname,email:e.login.email,image:e.login.avatar}),...e});export{e as mailchimp};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../assert-NJGroSJd.cjs`),t=t=>({id:`notion`,name:`Notion`,authorize:{url:`https://api.notion.com/v1/oauth/authorize`,params:{owner:`user`,scope:`user:read`,responseType:`code`}},accessToken:{url:`https://api.notion.com/v1/oauth/token`,headers:{Authorization:e.u(t?.clientId??`NOTION_CLIENT_ID`,t?.clientSecret??`NOTION_CLIENT_SECRET`)}},userInfo:{url:`https://api.notion.com/v1/users/me`,headers:{"Notion-Version":`2022-06-28`}},profile:e=>({sub:e.id,name:e.name,image:e.avatar_url??``,email:e?.bot?.owner?.user?.person?.email}),...t});exports.notion=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e}from"../assert-B3iQSYlK.js";const t=t=>({id:`notion`,name:`Notion`,authorize:{url:`https://api.notion.com/v1/oauth/authorize`,params:{owner:`user`,scope:`user:read`,responseType:`code`}},accessToken:{url:`https://api.notion.com/v1/oauth/token`,headers:{Authorization:e(t?.clientId??`NOTION_CLIENT_ID`,t?.clientSecret??`NOTION_CLIENT_SECRET`)}},userInfo:{url:`https://api.notion.com/v1/users/me`,headers:{"Notion-Version":`2022-06-28`}},profile:e=>({sub:e.id,name:e.name,image:e.avatar_url??``,email:e?.bot?.owner?.user?.person?.email}),...t});export{t as notion};
|
package/dist/oauth/pinterest.cjs
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/oauth/pinterest.ts
|
|
21
|
-
var pinterest_exports = {};
|
|
22
|
-
__export(pinterest_exports, {
|
|
23
|
-
pinterest: () => pinterest
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(pinterest_exports);
|
|
26
|
-
var pinterest = (options) => {
|
|
27
|
-
return {
|
|
28
|
-
id: "pinterest",
|
|
29
|
-
name: "Pinterest",
|
|
30
|
-
authorizeURL: "https://www.pinterest.com/oauth",
|
|
31
|
-
accessToken: "https://api.pinterest.com/v5/oauth/token",
|
|
32
|
-
userInfo: "https://api.pinterest.com/v5/user_account",
|
|
33
|
-
scope: "user_accounts:read",
|
|
34
|
-
responseType: "code",
|
|
35
|
-
profile(profile) {
|
|
36
|
-
return {
|
|
37
|
-
sub: profile.id,
|
|
38
|
-
name: profile.username,
|
|
39
|
-
image: profile.profile_image,
|
|
40
|
-
email: void 0
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
...options
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
pinterest
|
|
49
|
-
});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=e=>({id:`pinterest`,name:`Pinterest`,authorize:{url:`https://www.pinterest.com/oauth`,params:{scope:`user_accounts:read`,responseType:`code`}},authorizeURL:`https://www.pinterest.com/oauth`,accessToken:`https://api.pinterest.com/v5/oauth/token`,userInfo:`https://api.pinterest.com/v5/user_account`,profile:e=>({sub:e.id,name:e.username,image:e.profile_image,email:void 0}),...e});exports.pinterest=e;
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import 'zod';
|
|
4
|
-
import '../schemas.js';
|
|
5
|
-
import '../jose.js';
|
|
6
|
-
import '@aura-stack/jose';
|
|
7
|
-
import '@aura-stack/jose/jose';
|
|
8
|
-
import '@aura-stack/router/cookie';
|
|
1
|
+
import { hn as pinterest, mn as PinterestProfile } from "../index-nqLV2t91.js";
|
|
2
|
+
export { PinterestProfile, pinterest };
|
package/dist/oauth/pinterest.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
pinterest
|
|
3
|
-
} from "../chunk-E6G5YCI6.js";
|
|
4
|
-
export {
|
|
5
|
-
pinterest
|
|
6
|
-
};
|
|
1
|
+
const e=e=>({id:`pinterest`,name:`Pinterest`,authorize:{url:`https://www.pinterest.com/oauth`,params:{scope:`user_accounts:read`,responseType:`code`}},authorizeURL:`https://www.pinterest.com/oauth`,accessToken:`https://api.pinterest.com/v5/oauth/token`,userInfo:`https://api.pinterest.com/v5/user_account`,profile:e=>({sub:e.id,name:e.username,image:e.profile_image,email:void 0}),...e});export{e as pinterest};
|
package/dist/oauth/spotify.cjs
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/oauth/spotify.ts
|
|
21
|
-
var spotify_exports = {};
|
|
22
|
-
__export(spotify_exports, {
|
|
23
|
-
spotify: () => spotify
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(spotify_exports);
|
|
26
|
-
var spotify = (options) => {
|
|
27
|
-
return {
|
|
28
|
-
id: "spotify",
|
|
29
|
-
name: "Spotify",
|
|
30
|
-
authorizeURL: "https://accounts.spotify.com/authorize",
|
|
31
|
-
accessToken: "https://accounts.spotify.com/api/token",
|
|
32
|
-
userInfo: "https://api.spotify.com/v1/me",
|
|
33
|
-
scope: "user-read-private user-read-email",
|
|
34
|
-
responseType: "code",
|
|
35
|
-
profile(profile) {
|
|
36
|
-
return {
|
|
37
|
-
sub: profile.id,
|
|
38
|
-
name: profile.display_name,
|
|
39
|
-
email: profile.email,
|
|
40
|
-
image: profile.images[0]?.url ?? void 0
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
...options
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
spotify
|
|
49
|
-
});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=e=>({id:`spotify`,name:`Spotify`,authorize:{url:`https://accounts.spotify.com/authorize`,params:{responseType:`code`,scope:`user-read-private user-read-email`}},authorizeURL:`https://accounts.spotify.com/authorize`,accessToken:`https://accounts.spotify.com/api/token`,userInfo:`https://api.spotify.com/v1/me`,profile:e=>({sub:e.id,name:e.display_name,email:e.email,image:e.images[0]?.url??void 0}),...e});exports.spotify=e;
|
package/dist/oauth/spotify.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../schemas.js';
|
|
4
|
-
import '../jose.js';
|
|
5
|
-
import '@aura-stack/jose';
|
|
6
|
-
import '@aura-stack/jose/jose';
|
|
7
|
-
import '@aura-stack/router/cookie';
|
|
8
|
-
import '../@types/utility.js';
|
|
1
|
+
import { Dn as spotify, En as SpotifyProfile, Tn as SpotifyImage } from "../index-nqLV2t91.js";
|
|
2
|
+
export { SpotifyImage, SpotifyProfile, spotify };
|
package/dist/oauth/spotify.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
spotify
|
|
3
|
-
} from "../chunk-IPKO6UQN.js";
|
|
4
|
-
export {
|
|
5
|
-
spotify
|
|
6
|
-
};
|
|
1
|
+
const e=e=>({id:`spotify`,name:`Spotify`,authorize:{url:`https://accounts.spotify.com/authorize`,params:{responseType:`code`,scope:`user-read-private user-read-email`}},authorizeURL:`https://accounts.spotify.com/authorize`,accessToken:`https://accounts.spotify.com/api/token`,userInfo:`https://api.spotify.com/v1/me`,profile:e=>({sub:e.id,name:e.display_name,email:e.email,image:e.images[0]?.url??void 0}),...e});export{e as spotify};
|
package/dist/oauth/strava.cjs
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/oauth/strava.ts
|
|
21
|
-
var strava_exports = {};
|
|
22
|
-
__export(strava_exports, {
|
|
23
|
-
strava: () => strava
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(strava_exports);
|
|
26
|
-
var strava = (options) => {
|
|
27
|
-
return {
|
|
28
|
-
id: "strava",
|
|
29
|
-
name: "Strava",
|
|
30
|
-
authorizeURL: "https://www.strava.com/oauth/authorize",
|
|
31
|
-
accessToken: "https://www.strava.com/oauth/token",
|
|
32
|
-
userInfo: "https://www.strava.com/api/v3/athlete",
|
|
33
|
-
scope: "read",
|
|
34
|
-
responseType: "code",
|
|
35
|
-
profile(profile) {
|
|
36
|
-
return {
|
|
37
|
-
sub: profile.id.toString(),
|
|
38
|
-
name: `${profile.firstname} ${profile.lastname}`,
|
|
39
|
-
image: profile.profile,
|
|
40
|
-
email: void 0
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
...options
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
strava
|
|
49
|
-
});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=e=>({id:`strava`,name:`Strava`,authorize:{url:`https://www.strava.com/oauth/authorize`,params:{scope:`read`,responseType:`code`}},accessToken:`https://www.strava.com/oauth/token`,userInfo:`https://www.strava.com/api/v3/athlete`,profile:e=>({sub:e.id.toString(),name:`${e.firstname} ${e.lastname}`,image:e.profile,email:void 0}),...e});exports.strava=e;
|
package/dist/oauth/strava.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../schemas.js';
|
|
4
|
-
import '../jose.js';
|
|
5
|
-
import '@aura-stack/jose';
|
|
6
|
-
import '@aura-stack/jose/jose';
|
|
7
|
-
import '@aura-stack/router/cookie';
|
|
8
|
-
import '../@types/utility.js';
|
|
1
|
+
import { Sn as strava, bn as SummaryClub, xn as SummaryGear, yn as StravaProfile } from "../index-nqLV2t91.js";
|
|
2
|
+
export { StravaProfile, SummaryClub, SummaryGear, strava };
|
package/dist/oauth/strava.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
strava
|
|
3
|
-
} from "../chunk-54CZPKR4.js";
|
|
4
|
-
export {
|
|
5
|
-
strava
|
|
6
|
-
};
|
|
1
|
+
const e=e=>({id:`strava`,name:`Strava`,authorize:{url:`https://www.strava.com/oauth/authorize`,params:{scope:`read`,responseType:`code`}},accessToken:`https://www.strava.com/oauth/token`,userInfo:`https://www.strava.com/api/v3/athlete`,profile:e=>({sub:e.id.toString(),name:`${e.firstname} ${e.lastname}`,image:e.profile,email:void 0}),...e});export{e as strava};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../env-bq387KyP.cjs`),t=t=>({id:`twitch`,name:`Twitch`,authorize:{url:`https://id.twitch.tv/oauth2/authorize`,params:{scope:`user:read:email`,responseType:`code`}},accessToken:`https://id.twitch.tv/oauth2/token`,userInfo:{url:`https://api.twitch.tv/helix/users`,headers:{"Client-ID":t?.clientId??e.n(`TWITCH_CLIENT_ID`)}},profile(e){let t=e.data[0];if(!t)throw Error(`No user data found in Twitch profile response`);return{sub:t.id,name:t.display_name,email:t.email,image:t.profile_image_url}},...t});exports.twitch=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../env-nvh8QBNz.js";const t=t=>({id:`twitch`,name:`Twitch`,authorize:{url:`https://id.twitch.tv/oauth2/authorize`,params:{scope:`user:read:email`,responseType:`code`}},accessToken:`https://id.twitch.tv/oauth2/token`,userInfo:{url:`https://api.twitch.tv/helix/users`,headers:{"Client-ID":t?.clientId??e(`TWITCH_CLIENT_ID`)}},profile(e){let t=e.data[0];if(!t)throw Error(`No user data found in Twitch profile response`);return{sub:t.id,name:t.display_name,email:t.email,image:t.profile_image_url}},...t});export{t as twitch};
|
package/dist/oauth/x.cjs
CHANGED
|
@@ -1,49 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/oauth/x.ts
|
|
21
|
-
var x_exports = {};
|
|
22
|
-
__export(x_exports, {
|
|
23
|
-
x: () => x
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(x_exports);
|
|
26
|
-
var x = (options) => {
|
|
27
|
-
return {
|
|
28
|
-
id: "x",
|
|
29
|
-
name: "X",
|
|
30
|
-
authorizeURL: "https://twitter.com/i/oauth2/authorize",
|
|
31
|
-
accessToken: "https://api.twitter.com/2/oauth2/token",
|
|
32
|
-
userInfo: "https://api.twitter.com/2/users/me?user.fields=profile_image_url",
|
|
33
|
-
scope: "tweet.read users.read offline.access",
|
|
34
|
-
responseType: "code",
|
|
35
|
-
profile(profile) {
|
|
36
|
-
return {
|
|
37
|
-
sub: profile.data.id,
|
|
38
|
-
name: profile.data.name,
|
|
39
|
-
image: profile.data.profile_image_url,
|
|
40
|
-
email: void 0
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
...options
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
x
|
|
49
|
-
});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=e=>({id:`x`,name:`X`,authorize:{url:`https://twitter.com/i/oauth2/authorize`,params:{scope:`tweet.read users.read offline.access`,response_type:`code`}},accessToken:`https://api.twitter.com/2/oauth2/token`,userInfo:`https://api.twitter.com/2/users/me?user.fields=profile_image_url`,profile:e=>({sub:e.data.id,name:e.data.name,image:e.data.profile_image_url,email:void 0}),...e});exports.x=e;
|
package/dist/oauth/x.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../schemas.js';
|
|
4
|
-
import '../jose.js';
|
|
5
|
-
import '@aura-stack/jose';
|
|
6
|
-
import '@aura-stack/jose/jose';
|
|
7
|
-
import '@aura-stack/router/cookie';
|
|
8
|
-
import '../@types/utility.js';
|
|
1
|
+
import { Cn as XProfile, wn as x } from "../index-nqLV2t91.js";
|
|
2
|
+
export { XProfile, x };
|
package/dist/oauth/x.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
x
|
|
3
|
-
} from "../chunk-EEE7UM5T.js";
|
|
4
|
-
export {
|
|
5
|
-
x
|
|
6
|
-
};
|
|
1
|
+
const e=e=>({id:`x`,name:`X`,authorize:{url:`https://twitter.com/i/oauth2/authorize`,params:{scope:`tweet.read users.read offline.access`,response_type:`code`}},accessToken:`https://api.twitter.com/2/oauth2/token`,userInfo:`https://api.twitter.com/2/users/me?user.fields=profile_image_url`,profile:e=>({sub:e.data.id,name:e.data.name,image:e.data.profile_image_url,email:void 0}),...e});export{e as x};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./errors-CCYPHuBO.cjs`),t=require(`./env-bq387KyP.cjs`),n=require(`./assert-NJGroSJd.cjs`),r=require(`./oauth/github.cjs`),i=require(`./oauth/bitbucket.cjs`),a=require(`./oauth/figma.cjs`),o=require(`./oauth/discord.cjs`),s=require(`./oauth/gitlab.cjs`),c=require(`./oauth/spotify.cjs`),l=require(`./oauth/x.cjs`),u=require(`./oauth/strava.cjs`),d=require(`./oauth/mailchimp.cjs`),f=require(`./oauth/pinterest.cjs`),p=require(`./oauth/twitch.cjs`),m=require(`./oauth/notion.cjs`),h=require(`./oauth/dropbox.cjs`),g=require(`./oauth/atlassian.cjs`);let _=require(`zod/v4`);const v=_.z.union([(0,_.string)().url(),(0,_.object)({url:(0,_.string)().url(),params:(0,_.object)({owner:(0,_.string)().optional(),responseType:(0,_.enum)([`code`,`token`,`id_token`,`refresh_token`]).optional(),scope:(0,_.string)().optional()})})]),y=_.z.union([(0,_.string)().url(),(0,_.object)({url:(0,_.string)().url(),headers:_.z.record((0,_.string)(),(0,_.string)()).optional()})]),b=_.z.union([(0,_.string)().url(),(0,_.object)({url:(0,_.string)().url(),headers:_.z.record((0,_.string)(),(0,_.string)()).optional(),method:(0,_.string)().optional()})]),x=(0,_.object)({id:(0,_.string)(),name:(0,_.string)(),authorize:v.optional(),authorizeURL:(0,_.string)().url().optional(),accessToken:y,scope:(0,_.string)().optional(),userInfo:b,responseType:(0,_.enum)([`code`,`token`,`id_token`,`refresh_token`]).optional(),clientId:(0,_.string)(),clientSecret:(0,_.string)(),profile:_.z.function().optional()}),S=(0,_.object)({authorize:v.optional(),authorizeURL:(0,_.string)().url().optional(),accessToken:y,scope:(0,_.string)().optional(),userInfo:b,responseType:(0,_.enum)([`code`,`token`,`id_token`,`refresh_token`]).optional(),clientId:(0,_.string)(),clientSecret:(0,_.string)()}),C=S.extend({redirectURI:(0,_.string)(),state:(0,_.string)(),codeChallenge:(0,_.string)(),codeChallengeMethod:(0,_.enum)([`plain`,`S256`])});(0,_.object)({state:(0,_.string)({message:`Missing state parameter in the OAuth authorization response.`}),code:(0,_.string)({message:`Missing code parameter in the OAuth authorization response.`})});const w=(0,_.object)({error:(0,_.enum)([`invalid_request`,`unauthorized_client`,`access_denied`,`unsupported_response_type`,`invalid_scope`,`server_error`,`temporarily_unavailable`]),error_description:(0,_.string)().optional(),error_uri:(0,_.string)().optional(),state:(0,_.string)()});S.extend({redirectURI:(0,_.string)(),code:(0,_.string)(),codeVerifier:(0,_.string)().min(43).max(128)});const T=(0,_.object)({access_token:(0,_.string)(),token_type:(0,_.string)().optional(),expires_in:(0,_.number)().optional(),refresh_token:(0,_.string)().optional(),scope:(0,_.union)([(0,_.string)().optional().or((0,_.null)()),(0,_.array)((0,_.string)()).optional()])}),E=(0,_.object)({error:(0,_.enum)([`invalid_request`,`invalid_client`,`invalid_grant`,`unauthorized_client`,`unsupported_grant_type`,`invalid_scope`]),error_description:(0,_.string)().optional(),error_uri:(0,_.string)().optional()}),D=(0,_.object)({error:(0,_.string)(),error_description:(0,_.string)().optional()}),O=(0,_.object)({clientId:_.z.string().min(1,`OAuth Client ID is required in the environment variables.`),clientSecret:_.z.string().min(1,`OAuth Client Secret is required in the environment variables.`)}),k={github:r.github,bitbucket:i.bitbucket,figma:a.figma,discord:o.discord,gitlab:s.gitlab,spotify:c.spotify,x:l.x,strava:u.strava,mailchimp:d.mailchimp,pinterest:f.pinterest,twitch:p.twitch,notion:m.notion,dropbox:h.dropbox,atlassian:g.atlassian},A=r=>{let i=O.safeParse({clientId:t.n(`${r.toUpperCase()}_CLIENT_ID`),clientSecret:t.n(`${r.toUpperCase()}_CLIENT_SECRET`)});if(!i.success)throw new e.n(`INVALID_ENVIRONMENT_CONFIGURATION`,JSON.stringify({[r]:n.p(i.error)},null,2));return i.data},j=t=>{if(typeof t==`string`){let r=A(t),i=k[t](),a=x.safeParse({...i,...r});if(!a.success)throw new e.n(`INVALID_OAUTH_PROVIDER_CONFIGURATION`,`Invalid configuration for OAuth provider "${t}": ${JSON.stringify({[t]:n.p(a.error)},null,2)}`);return a.data}let r=t.clientId&&t.clientSecret?{}:A(t.id),i=x.safeParse({...r,...t});if(!i.success){let r=JSON.stringify({[t.id]:n.p(i.error)},null,2);throw new e.n(`INVALID_OAUTH_PROVIDER_CONFIGURATION`,`Invalid configuration for OAuth provider "${t.id}": ${r}`)}return i.data},M=(t=[])=>t.reduce((t,n)=>{let r=j(n);if(r.id in t)throw new e.n(`DUPLICATED_OAUTH_PROVIDER_ID`,`Duplicate OAuth provider id "${r.id}" found. Each provider must have a unique id.`);return{...t,[r.id]:r}},{});Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return k}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./errors-DFWHOho6.js";import{n as t}from"./env-nvh8QBNz.js";import{p as n}from"./assert-B3iQSYlK.js";import{github as r}from"./oauth/github.js";import{bitbucket as i}from"./oauth/bitbucket.js";import{figma as a}from"./oauth/figma.js";import{discord as o}from"./oauth/discord.js";import{gitlab as s}from"./oauth/gitlab.js";import{spotify as c}from"./oauth/spotify.js";import{x as l}from"./oauth/x.js";import{strava as u}from"./oauth/strava.js";import{mailchimp as d}from"./oauth/mailchimp.js";import{pinterest as f}from"./oauth/pinterest.js";import{twitch as p}from"./oauth/twitch.js";import{notion as m}from"./oauth/notion.js";import{dropbox as h}from"./oauth/dropbox.js";import{atlassian as g}from"./oauth/atlassian.js";import{array as _,enum as v,null as y,number as b,object as x,string as S,union as C,z as w}from"zod/v4";const T=w.union([S().url(),x({url:S().url(),params:x({owner:S().optional(),responseType:v([`code`,`token`,`id_token`,`refresh_token`]).optional(),scope:S().optional()})})]),E=w.union([S().url(),x({url:S().url(),headers:w.record(S(),S()).optional()})]),D=w.union([S().url(),x({url:S().url(),headers:w.record(S(),S()).optional(),method:S().optional()})]),O=x({id:S(),name:S(),authorize:T.optional(),authorizeURL:S().url().optional(),accessToken:E,scope:S().optional(),userInfo:D,responseType:v([`code`,`token`,`id_token`,`refresh_token`]).optional(),clientId:S(),clientSecret:S(),profile:w.function().optional()}),k=x({authorize:T.optional(),authorizeURL:S().url().optional(),accessToken:E,scope:S().optional(),userInfo:D,responseType:v([`code`,`token`,`id_token`,`refresh_token`]).optional(),clientId:S(),clientSecret:S()}),A=k.extend({redirectURI:S(),state:S(),codeChallenge:S(),codeChallengeMethod:v([`plain`,`S256`])});x({state:S({message:`Missing state parameter in the OAuth authorization response.`}),code:S({message:`Missing code parameter in the OAuth authorization response.`})});const j=x({error:v([`invalid_request`,`unauthorized_client`,`access_denied`,`unsupported_response_type`,`invalid_scope`,`server_error`,`temporarily_unavailable`]),error_description:S().optional(),error_uri:S().optional(),state:S()});k.extend({redirectURI:S(),code:S(),codeVerifier:S().min(43).max(128)});const M=x({access_token:S(),token_type:S().optional(),expires_in:b().optional(),refresh_token:S().optional(),scope:C([S().optional().or(y()),_(S()).optional()])}),N=x({error:v([`invalid_request`,`invalid_client`,`invalid_grant`,`unauthorized_client`,`unsupported_grant_type`,`invalid_scope`]),error_description:S().optional(),error_uri:S().optional()}),P=x({error:S(),error_description:S().optional()}),F=x({clientId:w.string().min(1,`OAuth Client ID is required in the environment variables.`),clientSecret:w.string().min(1,`OAuth Client Secret is required in the environment variables.`)}),I={github:r,bitbucket:i,figma:a,discord:o,gitlab:s,spotify:c,x:l,strava:u,mailchimp:d,pinterest:f,twitch:p,notion:m,dropbox:h,atlassian:g},L=r=>{let i=F.safeParse({clientId:t(`${r.toUpperCase()}_CLIENT_ID`),clientSecret:t(`${r.toUpperCase()}_CLIENT_SECRET`)});if(!i.success)throw new e(`INVALID_ENVIRONMENT_CONFIGURATION`,JSON.stringify({[r]:n(i.error)},null,2));return i.data},R=t=>{if(typeof t==`string`){let r=L(t),i=I[t](),a=O.safeParse({...i,...r});if(!a.success)throw new e(`INVALID_OAUTH_PROVIDER_CONFIGURATION`,`Invalid configuration for OAuth provider "${t}": ${JSON.stringify({[t]:n(a.error)},null,2)}`);return a.data}let r=t.clientId&&t.clientSecret?{}:L(t.id),i=O.safeParse({...r,...t});if(!i.success){let r=JSON.stringify({[t.id]:n(i.error)},null,2);throw new e(`INVALID_OAUTH_PROVIDER_CONFIGURATION`,`Invalid configuration for OAuth provider "${t.id}": ${r}`)}return i.data},z=(t=[])=>t.reduce((t,n)=>{let r=R(n);if(r.id in t)throw new e(`DUPLICATED_OAUTH_PROVIDER_ID`,`Duplicate OAuth provider id "${r.id}" found. Each provider must have a unique id.`);return{...t,[r.id]:r}},{});export{A as a,M as i,z as n,j as o,N as r,P as s,I as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../crypto-CoXA5w_4.cjs`);exports.createCSRF=e.t,exports.createHash=e.n,exports.createPKCE=e.r,exports.createSecretValue=e.i,exports.hashPassword=e.a,exports.verifyCSRF=e.o,exports.verifyPassword=e.s;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Nt as JoseInstance, _t as User, xt as AuthRuntimeConfig } from "../index-nqLV2t91.js";
|
|
2
|
+
|
|
3
|
+
//#region src/shared/crypto.d.ts
|
|
4
|
+
declare const createSecretValue: (length?: number) => string;
|
|
5
|
+
declare const createHash: (data: string) => Promise<string>;
|
|
6
|
+
/**
|
|
7
|
+
* Creates the code challenge flow for PKCE OAuth flow. It generates a code verifier and its corresponding
|
|
8
|
+
* code challenge using SHA-256 hashing.
|
|
9
|
+
* - code_verifier: A cryptographically random string used to mitigate authorization code interception attacks.
|
|
10
|
+
* - code_challenge: A hashed version of the code_verifier sent in the authorization request.
|
|
11
|
+
* - method: The method used to generate the code challenge, typically "S256" for SHA-256.
|
|
12
|
+
*
|
|
13
|
+
* @see https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
|
|
14
|
+
*/
|
|
15
|
+
declare const createPKCE: (verifier?: string) => Promise<{
|
|
16
|
+
codeVerifier: string;
|
|
17
|
+
codeChallenge: string;
|
|
18
|
+
method: string;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Creates a CSRF token to be used in OAuth flows to prevent cross-site request forgery attacks.
|
|
22
|
+
*
|
|
23
|
+
* @param csrfCookie - Optional existing CSRF cookie to verify and reuse
|
|
24
|
+
* @returns Signed CSRF token
|
|
25
|
+
*/
|
|
26
|
+
declare const createCSRF: (jose: AuthRuntimeConfig["jose"], csrfCookie?: string) => Promise<string>;
|
|
27
|
+
declare const verifyCSRF: <DefaultUser extends User = User>(jose: JoseInstance<DefaultUser>, cookie: string, header: string) => Promise<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Hashes a password using PBKDF2 with SHA-256.
|
|
30
|
+
* PBKDF2 is available in standard Web Crypto (SubtleCrypto).
|
|
31
|
+
*
|
|
32
|
+
* @param password - The password to hash.
|
|
33
|
+
* @param salt - Optional salt (base64url encoded). If not provided, a random salt will be generated.
|
|
34
|
+
* @param iterations - The number of PBKDF2 iterations. Default is 100,000.
|
|
35
|
+
* @returns The hashed password in the format `iterations:salt:hash` (all segments base64url encoded).
|
|
36
|
+
*/
|
|
37
|
+
declare const hashPassword: (password: string, salt?: string, iterations?: number) => Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Verifies a password against a hashed value.
|
|
40
|
+
*
|
|
41
|
+
* @param password - The password to verify.
|
|
42
|
+
* @param hashedPassword - The hashed password to compare against.
|
|
43
|
+
* @returns A promise that resolves to true if the password matches the hash, false otherwise.
|
|
44
|
+
*/
|
|
45
|
+
declare const verifyPassword: (password: string, hashedPassword: string) => Promise<boolean>;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { createCSRF, createHash, createPKCE, createSecretValue, hashPassword, verifyCSRF, verifyPassword };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"../crypto-Bz8nIciY.js";export{o as createCSRF,n as createHash,i as createPKCE,t as createSecretValue,e as hashPassword,r as verifyCSRF,a as verifyPassword};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`zod/v4`);const t=e.z.object({sub:(0,e.string)(),name:(0,e.string)().nullable().optional(),image:(0,e.string)().nullable().optional(),email:(0,e.email)().nullable().optional()}),n=t=>e.z.object(t);exports.UserIdentity=t,exports.createIdentity=n;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Bn as UserIdentity, G as InferShape, H as EditableShape, Hn as UserShape, U as InferAuthIdentity, Un as createIdentity, Vn as UserIdentityType, W as InferIdentity, Y as ShapeToObject } from "../index-nqLV2t91.js";
|
|
2
|
+
export { EditableShape, InferAuthIdentity, InferIdentity, InferShape, ShapeToObject, UserIdentity, UserIdentityType, UserShape, createIdentity };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{email as e,string as t,z as n}from"zod/v4";const r=n.object({sub:t(),name:t().nullable().optional(),image:t().nullable().optional(),email:e().nullable().optional()}),i=e=>n.object(e);export{r as UserIdentity,i as createIdentity};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../assert-NJGroSJd.cjs`),t=require(`../logger-UnUhYL2V.cjs`);exports.createBasicAuthHeader=e.u,exports.createSyslogMessage=t.n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e}from"../assert-B3iQSYlK.js";import{n as t}from"../logger-C59_CDMk.js";export{e as createBasicAuthHeader,t as createSyslogMessage};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aura-stack/auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Core auth for @aura-stack/auth",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"access": "public",
|
|
13
13
|
"registry": "https://registry.npmjs.org/@aura-stack/auth"
|
|
14
14
|
},
|
|
15
|
+
"sideEffects": false,
|
|
15
16
|
"files": [
|
|
16
17
|
"dist"
|
|
17
18
|
],
|
|
@@ -21,6 +22,11 @@
|
|
|
21
22
|
"import": "./dist/index.js",
|
|
22
23
|
"require": "./dist/index.cjs"
|
|
23
24
|
},
|
|
25
|
+
"./oauth": {
|
|
26
|
+
"types": "./dist/oauth/index.d.ts",
|
|
27
|
+
"import": "./dist/oauth/index.js",
|
|
28
|
+
"require": "./dist/oauth/index.cjs"
|
|
29
|
+
},
|
|
24
30
|
"./oauth/*": {
|
|
25
31
|
"types": "./dist/oauth/*.d.ts",
|
|
26
32
|
"import": "./dist/oauth/*.js",
|
|
@@ -30,6 +36,26 @@
|
|
|
30
36
|
"types": "./dist/@types/index.d.ts",
|
|
31
37
|
"import": "./dist/@types/index.js",
|
|
32
38
|
"require": "./dist/@types/index.cjs"
|
|
39
|
+
},
|
|
40
|
+
"./client": {
|
|
41
|
+
"types": "./dist/client/index.d.ts",
|
|
42
|
+
"import": "./dist/client/index.js",
|
|
43
|
+
"require": "./dist/client/index.cjs"
|
|
44
|
+
},
|
|
45
|
+
"./identity": {
|
|
46
|
+
"types": "./dist/shared/identity.d.ts",
|
|
47
|
+
"import": "./dist/shared/identity.js",
|
|
48
|
+
"require": "./dist/shared/identity.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./crypto": {
|
|
51
|
+
"types": "./dist/shared/crypto.d.ts",
|
|
52
|
+
"import": "./dist/shared/crypto.js",
|
|
53
|
+
"require": "./dist/shared/crypto.cjs"
|
|
54
|
+
},
|
|
55
|
+
"./shared": {
|
|
56
|
+
"types": "./dist/shared/index.d.ts",
|
|
57
|
+
"import": "./dist/shared/index.js",
|
|
58
|
+
"require": "./dist/shared/index.cjs"
|
|
33
59
|
}
|
|
34
60
|
},
|
|
35
61
|
"keywords": [
|
|
@@ -44,27 +70,28 @@
|
|
|
44
70
|
},
|
|
45
71
|
"license": "MIT",
|
|
46
72
|
"dependencies": {
|
|
47
|
-
"@aura-stack/router": "^0.
|
|
48
|
-
"zod": "
|
|
49
|
-
"@aura-stack/jose": "0.
|
|
73
|
+
"@aura-stack/router": "^0.6.0",
|
|
74
|
+
"zod": "4.3.5",
|
|
75
|
+
"@aura-stack/jose": "0.5.0"
|
|
50
76
|
},
|
|
51
77
|
"devDependencies": {
|
|
52
|
-
"@types/node": "^24.9.2",
|
|
53
78
|
"typescript": "^5.9.2",
|
|
79
|
+
"vitest": "4.1.4",
|
|
54
80
|
"@aura-stack/tsconfig": "0.0.0",
|
|
55
|
-
"@aura-stack/
|
|
81
|
+
"@aura-stack/tsdown-config": "0.0.0"
|
|
56
82
|
},
|
|
57
83
|
"scripts": {
|
|
58
|
-
"dev": "
|
|
59
|
-
"build": "
|
|
84
|
+
"dev": "tsdown --watch",
|
|
85
|
+
"build": "tsdown",
|
|
86
|
+
"lint": "oxlint",
|
|
87
|
+
"lint:fix": "oxlint --fix",
|
|
60
88
|
"test": "vitest --run",
|
|
61
89
|
"test:watch": "vitest",
|
|
62
90
|
"test:coverage": "vitest --run --coverage",
|
|
63
|
-
"format": "
|
|
64
|
-
"format:check": "
|
|
91
|
+
"format": "oxfmt",
|
|
92
|
+
"format:check": "oxfmt --check",
|
|
65
93
|
"type-check": "tsc --noEmit",
|
|
66
94
|
"clean": "rm -rf dist",
|
|
67
|
-
"clean:cts": "find dist -type f -name \"*.cts\" -delete"
|
|
68
|
-
"prepublish": "pnpm clean:cts"
|
|
95
|
+
"clean:cts": "if [ -d dist ]; then find dist -type f -name \"*.cts\" -delete; fi"
|
|
69
96
|
}
|
|
70
97
|
}
|
package/dist/@types/router.d.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { R as RouterGlobalContext } from '../index-CSyIJmCM.js';
|
|
2
|
-
import 'zod';
|
|
3
|
-
import '../schemas.js';
|
|
4
|
-
import '../jose.js';
|
|
5
|
-
import '@aura-stack/jose';
|
|
6
|
-
import '@aura-stack/jose/jose';
|
|
7
|
-
import '@aura-stack/router/cookie';
|
|
8
|
-
import './utility.js';
|
|
9
|
-
|
|
10
|
-
declare module "@aura-stack/router" {
|
|
11
|
-
interface GlobalContext extends RouterGlobalContext {}
|
|
12
|
-
}
|
package/dist/@types/router.d.js
DELETED
|
File without changes
|
package/dist/@types/utility.cjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/@types/utility.ts
|
|
17
|
-
var utility_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(utility_exports);
|
package/dist/@types/utility.d.ts
DELETED
package/dist/@types/utility.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "../chunk-PG7UYFG5.js";
|