@aura-stack/auth 0.5.0 → 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/README.md +36 -1
- package/dist/@types/index.cjs +0 -18
- package/dist/@types/index.d.ts +2 -12
- package/dist/@types/index.js +0 -1
- package/dist/assert-_fBNnaOk.js +3 -0
- package/dist/assert-hDwQ_SPO.cjs +3 -0
- package/dist/client/index.cjs +1 -135
- package/dist/client/index.d.ts +11 -14
- package/dist/client/index.js +1 -10
- package/dist/crypto-D6_SoGMH.cjs +1 -0
- package/dist/crypto-DyrRzBSQ.js +1 -0
- package/dist/env-7as-tgzO.cjs +1 -0
- package/dist/env-CJtSi1eX.js +1 -0
- package/dist/errors-Czt_w1t_.js +1 -0
- package/dist/errors-DcK2ELlk.cjs +1 -0
- package/dist/identity-b8FCr0Oa.cjs +1 -0
- package/dist/index-C9U6ICDT.d.ts +2796 -0
- package/dist/index.cjs +1 -2427
- package/dist/index.d.ts +2 -14
- package/dist/index.js +1 -59
- package/dist/logger-DjXkgSn5.js +1 -0
- package/dist/logger-G5PinyEc.cjs +1 -0
- package/dist/oauth/atlassian.cjs +1 -57
- package/dist/oauth/atlassian.d.ts +2 -12
- package/dist/oauth/atlassian.js +1 -6
- package/dist/oauth/bitbucket.cjs +1 -49
- package/dist/oauth/bitbucket.d.ts +2 -12
- package/dist/oauth/bitbucket.js +1 -6
- package/dist/oauth/click-up.cjs +1 -0
- package/dist/oauth/click-up.d.ts +2 -0
- package/dist/oauth/click-up.js +1 -0
- package/dist/oauth/discord.cjs +1 -57
- package/dist/oauth/discord.d.ts +2 -12
- package/dist/oauth/discord.js +1 -6
- package/dist/oauth/dribbble.cjs +1 -0
- package/dist/oauth/dribbble.d.ts +2 -0
- package/dist/oauth/dribbble.js +1 -0
- package/dist/oauth/dropbox.cjs +1 -53
- package/dist/oauth/dropbox.d.ts +2 -12
- package/dist/oauth/dropbox.js +1 -6
- package/dist/oauth/figma.cjs +1 -49
- package/dist/oauth/figma.d.ts +2 -12
- package/dist/oauth/figma.js +1 -6
- package/dist/oauth/github.cjs +1 -49
- package/dist/oauth/github.d.ts +2 -12
- package/dist/oauth/github.js +1 -6
- package/dist/oauth/gitlab.cjs +1 -49
- package/dist/oauth/gitlab.d.ts +2 -12
- package/dist/oauth/gitlab.js +1 -6
- package/dist/oauth/index.cjs +1 -673
- package/dist/oauth/index.d.ts +2 -12
- package/dist/oauth/index.js +1 -68
- package/dist/oauth/mailchimp.cjs +1 -49
- package/dist/oauth/mailchimp.d.ts +2 -12
- package/dist/oauth/mailchimp.js +1 -6
- package/dist/oauth/notion.cjs +1 -131
- package/dist/oauth/notion.d.ts +2 -12
- package/dist/oauth/notion.js +1 -9
- package/dist/oauth/pinterest.cjs +1 -49
- package/dist/oauth/pinterest.d.ts +2 -12
- package/dist/oauth/pinterest.js +1 -6
- package/dist/oauth/spotify.cjs +1 -49
- package/dist/oauth/spotify.d.ts +2 -12
- package/dist/oauth/spotify.js +1 -6
- package/dist/oauth/strava.cjs +1 -49
- package/dist/oauth/strava.d.ts +2 -12
- package/dist/oauth/strava.js +1 -6
- package/dist/oauth/twitch.cjs +1 -95
- package/dist/oauth/twitch.d.ts +2 -12
- package/dist/oauth/twitch.js +1 -7
- package/dist/oauth/x.cjs +1 -49
- package/dist/oauth/x.d.ts +2 -12
- package/dist/oauth/x.js +1 -6
- package/dist/oauth-D3_mnBOx.js +1 -0
- package/dist/oauth-gPiWxjBd.cjs +1 -0
- package/dist/shared/crypto.cjs +1 -0
- package/dist/shared/crypto.d.ts +71 -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 +37 -11
- package/dist/@types/router.d.cjs +0 -1
- package/dist/@types/router.d.d.ts +0 -16
- 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 -250
- package/dist/actions/callback/access-token.d.ts +0 -33
- package/dist/actions/callback/access-token.js +0 -9
- package/dist/actions/callback/callback.cjs +0 -715
- package/dist/actions/callback/callback.d.ts +0 -42
- package/dist/actions/callback/callback.js +0 -18
- package/dist/actions/callback/userinfo.cjs +0 -283
- package/dist/actions/callback/userinfo.d.ts +0 -25
- package/dist/actions/callback/userinfo.js +0 -13
- package/dist/actions/csrfToken/csrfToken.cjs +0 -189
- package/dist/actions/csrfToken/csrfToken.d.ts +0 -7
- package/dist/actions/csrfToken/csrfToken.js +0 -13
- package/dist/actions/index.cjs +0 -1161
- package/dist/actions/index.d.ts +0 -17
- package/dist/actions/index.js +0 -39
- package/dist/actions/session/session.cjs +0 -188
- package/dist/actions/session/session.d.ts +0 -7
- package/dist/actions/session/session.js +0 -12
- package/dist/actions/signIn/authorization-url.cjs +0 -288
- package/dist/actions/signIn/authorization-url.d.ts +0 -31
- package/dist/actions/signIn/authorization-url.js +0 -16
- package/dist/actions/signIn/authorization.cjs +0 -281
- package/dist/actions/signIn/authorization.d.ts +0 -54
- package/dist/actions/signIn/authorization.js +0 -19
- package/dist/actions/signIn/signIn.cjs +0 -595
- package/dist/actions/signIn/signIn.d.ts +0 -42
- package/dist/actions/signIn/signIn.js +0 -16
- package/dist/actions/signOut/signOut.cjs +0 -492
- package/dist/actions/signOut/signOut.d.ts +0 -16
- package/dist/actions/signOut/signOut.js +0 -15
- package/dist/api/createApi.cjs +0 -750
- package/dist/api/createApi.d.ts +0 -12
- package/dist/api/createApi.js +0 -19
- package/dist/api/getSession.cjs +0 -141
- package/dist/api/getSession.d.ts +0 -16
- package/dist/api/getSession.js +0 -10
- package/dist/api/signIn.cjs +0 -549
- package/dist/api/signIn.d.ts +0 -26
- package/dist/api/signIn.js +0 -15
- package/dist/api/signOut.cjs +0 -279
- package/dist/api/signOut.d.ts +0 -16
- package/dist/api/signOut.js +0 -13
- package/dist/assert.cjs +0 -194
- package/dist/assert.d.ts +0 -37
- package/dist/assert.js +0 -26
- package/dist/chunk-2A5B7GWR.js +0 -125
- package/dist/chunk-2GQLSIJ2.js +0 -40
- package/dist/chunk-2IR674WX.js +0 -44
- package/dist/chunk-3J5TUH2I.js +0 -50
- package/dist/chunk-4RWSYUKX.js +0 -98
- package/dist/chunk-4YHJ4IEQ.js +0 -25
- package/dist/chunk-54CZPKR4.js +0 -25
- package/dist/chunk-5LZ7TOM3.js +0 -25
- package/dist/chunk-5X7JZMEF.js +0 -0
- package/dist/chunk-7BE46WWS.js +0 -88
- package/dist/chunk-7YYXFKLR.js +0 -35
- package/dist/chunk-C3A37LQC.js +0 -33
- package/dist/chunk-CITNGXDA.js +0 -31
- package/dist/chunk-CWX724AG.js +0 -78
- package/dist/chunk-D2CSIUKP.js +0 -74
- package/dist/chunk-E6G5YCI6.js +0 -25
- package/dist/chunk-EBAMFRB7.js +0 -34
- package/dist/chunk-EEE7UM5T.js +0 -25
- package/dist/chunk-FPCVZUVG.js +0 -37
- package/dist/chunk-FW4W3REU.js +0 -25
- package/dist/chunk-GNNBM2WJ.js +0 -83
- package/dist/chunk-IPKO6UQN.js +0 -25
- package/dist/chunk-ITQ7352M.js +0 -0
- package/dist/chunk-JOCGX3RP.js +0 -59
- package/dist/chunk-KBXWTD6E.js +0 -94
- package/dist/chunk-KMMAZFSJ.js +0 -25
- package/dist/chunk-LATR3NIV.js +0 -117
- package/dist/chunk-LAYPUDQF.js +0 -39
- package/dist/chunk-LDU7A2JE.js +0 -25
- package/dist/chunk-LX3TJ2TJ.js +0 -294
- package/dist/chunk-NHZBQNRR.js +0 -143
- package/dist/chunk-OVHNRULD.js +0 -33
- package/dist/chunk-PDP3PHB3.js +0 -127
- package/dist/chunk-PG7UYFG5.js +0 -0
- package/dist/chunk-PHYNROD4.js +0 -47
- package/dist/chunk-QQEKY4XP.js +0 -29
- package/dist/chunk-U4RK4LKJ.js +0 -348
- package/dist/chunk-U5663F2U.js +0 -70
- package/dist/chunk-UN7X6SU5.js +0 -53
- package/dist/chunk-UZQJJD6A.js +0 -100
- package/dist/chunk-V6LLEAR4.js +0 -80
- package/dist/chunk-WHNDRO3N.js +0 -50
- package/dist/chunk-XY5R3EHH.js +0 -204
- package/dist/chunk-ZNCZVF6U.js +0 -14
- package/dist/client/client.cjs +0 -135
- package/dist/client/client.d.ts +0 -85
- package/dist/client/client.js +0 -9
- package/dist/context.cjs +0 -1237
- package/dist/context.d.ts +0 -16
- package/dist/context.js +0 -28
- package/dist/cookie.cjs +0 -277
- package/dist/cookie.d.ts +0 -89
- package/dist/cookie.js +0 -30
- package/dist/createAuth.cjs +0 -2320
- package/dist/createAuth.d.ts +0 -12
- package/dist/createAuth.js +0 -48
- package/dist/env.cjs +0 -78
- package/dist/env.d.ts +0 -10
- package/dist/env.js +0 -12
- package/dist/errors.cjs +0 -102
- package/dist/errors.d.ts +0 -60
- package/dist/errors.js +0 -22
- package/dist/headers.cjs +0 -61
- package/dist/headers.d.ts +0 -33
- package/dist/headers.js +0 -12
- package/dist/index-_aXtxb_s.d.ts +0 -1377
- package/dist/jose.cjs +0 -166
- package/dist/jose.d.ts +0 -12
- package/dist/jose.js +0 -20
- package/dist/logger.cjs +0 -424
- package/dist/logger.d.ts +0 -12
- package/dist/logger.js +0 -17
- package/dist/request.cjs +0 -38
- package/dist/request.d.ts +0 -13
- package/dist/request.js +0 -6
- package/dist/schemas.cjs +0 -158
- package/dist/schemas.d.ts +0 -229
- package/dist/schemas.js +0 -24
- package/dist/secure.cjs +0 -170
- package/dist/secure.d.ts +0 -41
- package/dist/secure.js +0 -20
- package/dist/utils.cjs +0 -329
- package/dist/utils.d.ts +0 -35
- package/dist/utils.js +0 -36
package/dist/oauth/index.js
CHANGED
|
@@ -1,68 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
builtInOAuthProviders,
|
|
3
|
-
createBuiltInOAuthProviders
|
|
4
|
-
} from "../chunk-PDP3PHB3.js";
|
|
5
|
-
import {
|
|
6
|
-
mailchimp
|
|
7
|
-
} from "../chunk-LDU7A2JE.js";
|
|
8
|
-
import {
|
|
9
|
-
notion
|
|
10
|
-
} from "../chunk-PHYNROD4.js";
|
|
11
|
-
import {
|
|
12
|
-
pinterest
|
|
13
|
-
} from "../chunk-E6G5YCI6.js";
|
|
14
|
-
import {
|
|
15
|
-
spotify
|
|
16
|
-
} from "../chunk-IPKO6UQN.js";
|
|
17
|
-
import {
|
|
18
|
-
strava
|
|
19
|
-
} from "../chunk-54CZPKR4.js";
|
|
20
|
-
import {
|
|
21
|
-
twitch
|
|
22
|
-
} from "../chunk-2GQLSIJ2.js";
|
|
23
|
-
import {
|
|
24
|
-
x
|
|
25
|
-
} from "../chunk-EEE7UM5T.js";
|
|
26
|
-
import {
|
|
27
|
-
atlassian
|
|
28
|
-
} from "../chunk-C3A37LQC.js";
|
|
29
|
-
import {
|
|
30
|
-
bitbucket
|
|
31
|
-
} from "../chunk-4YHJ4IEQ.js";
|
|
32
|
-
import {
|
|
33
|
-
discord
|
|
34
|
-
} from "../chunk-OVHNRULD.js";
|
|
35
|
-
import {
|
|
36
|
-
dropbox
|
|
37
|
-
} from "../chunk-QQEKY4XP.js";
|
|
38
|
-
import {
|
|
39
|
-
figma
|
|
40
|
-
} from "../chunk-KMMAZFSJ.js";
|
|
41
|
-
import {
|
|
42
|
-
github
|
|
43
|
-
} from "../chunk-FW4W3REU.js";
|
|
44
|
-
import {
|
|
45
|
-
gitlab
|
|
46
|
-
} from "../chunk-5LZ7TOM3.js";
|
|
47
|
-
import "../chunk-2A5B7GWR.js";
|
|
48
|
-
import "../chunk-LX3TJ2TJ.js";
|
|
49
|
-
import "../chunk-WHNDRO3N.js";
|
|
50
|
-
import "../chunk-U5663F2U.js";
|
|
51
|
-
export {
|
|
52
|
-
atlassian,
|
|
53
|
-
bitbucket,
|
|
54
|
-
builtInOAuthProviders,
|
|
55
|
-
createBuiltInOAuthProviders,
|
|
56
|
-
discord,
|
|
57
|
-
dropbox,
|
|
58
|
-
figma,
|
|
59
|
-
github,
|
|
60
|
-
gitlab,
|
|
61
|
-
mailchimp,
|
|
62
|
-
notion,
|
|
63
|
-
pinterest,
|
|
64
|
-
spotify,
|
|
65
|
-
strava,
|
|
66
|
-
twitch,
|
|
67
|
-
x
|
|
68
|
-
};
|
|
1
|
+
import{n as e,t}from"../oauth-D3_mnBOx.js";import{github as n}from"./github.js";import{bitbucket as r}from"./bitbucket.js";import{figma as i}from"./figma.js";import{discord as a}from"./discord.js";import{gitlab as o}from"./gitlab.js";import{spotify as s}from"./spotify.js";import{x as c}from"./x.js";import{strava as l}from"./strava.js";import{mailchimp as u}from"./mailchimp.js";import{pinterest as d}from"./pinterest.js";import{twitch as f}from"./twitch.js";import{notion as p}from"./notion.js";import{dropbox as m}from"./dropbox.js";import{atlassian as h}from"./atlassian.js";import{clickUp as g}from"./click-up.js";import{dribbble as _}from"./dribbble.js";export{h as atlassian,r as bitbucket,t as builtInOAuthProviders,g as clickUp,e as createBuiltInOAuthProviders,a as discord,_ as dribbble,m as dropbox,i as figma,n as github,o as gitlab,u as mailchimp,p as notion,d as pinterest,s as spotify,l as strava,f as twitch,c as x};
|
package/dist/oauth/mailchimp.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/mailchimp.ts
|
|
21
|
-
var mailchimp_exports = {};
|
|
22
|
-
__export(mailchimp_exports, {
|
|
23
|
-
mailchimp: () => mailchimp
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(mailchimp_exports);
|
|
26
|
-
var mailchimp = (options) => {
|
|
27
|
-
return {
|
|
28
|
-
id: "mailchimp",
|
|
29
|
-
name: "Mailchimp",
|
|
30
|
-
authorizeURL: "https://login.mailchimp.com/oauth2/authorize",
|
|
31
|
-
accessToken: "https://login.mailchimp.com/oauth2/token",
|
|
32
|
-
userInfo: "https://login.mailchimp.com/oauth2/metadata",
|
|
33
|
-
scope: "",
|
|
34
|
-
responseType: "code",
|
|
35
|
-
profile(profile) {
|
|
36
|
-
return {
|
|
37
|
-
sub: profile.user_id,
|
|
38
|
-
name: profile.accountname,
|
|
39
|
-
email: profile.login.email,
|
|
40
|
-
image: profile.login.avatar
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
...options
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
mailchimp
|
|
49
|
-
});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});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});exports.mailchimp=e;
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../schemas.js';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '@aura-stack/jose';
|
|
6
|
-
import '@aura-stack/jose/jose';
|
|
7
|
-
import '@aura-stack/jose/crypto';
|
|
8
|
-
import '@aura-stack/router/cookie';
|
|
9
|
-
import '../@types/utility.js';
|
|
10
|
-
import 'jose';
|
|
11
|
-
import '@aura-stack/router';
|
|
12
|
-
import 'zod/v4/core';
|
|
1
|
+
import { Bn as mailchimp, Rn as Login, zn as MailchimpProfile } from "../index-C9U6ICDT.js";
|
|
2
|
+
export { Login, MailchimpProfile, mailchimp };
|
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};
|
package/dist/oauth/notion.cjs
CHANGED
|
@@ -1,131 +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/notion.ts
|
|
21
|
-
var notion_exports = {};
|
|
22
|
-
__export(notion_exports, {
|
|
23
|
-
notion: () => notion
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(notion_exports);
|
|
26
|
-
|
|
27
|
-
// src/utils.ts
|
|
28
|
-
var import_router = require("@aura-stack/router");
|
|
29
|
-
|
|
30
|
-
// src/errors.ts
|
|
31
|
-
var AuthInternalError = class extends Error {
|
|
32
|
-
type = "AUTH_INTERNAL_ERROR";
|
|
33
|
-
code;
|
|
34
|
-
constructor(code, message, options) {
|
|
35
|
-
super(message, options);
|
|
36
|
-
this.code = code;
|
|
37
|
-
this.name = new.target.name;
|
|
38
|
-
Error.captureStackTrace(this, new.target);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
// src/env.ts
|
|
43
|
-
var import_meta = {};
|
|
44
|
-
var env = new Proxy({}, {
|
|
45
|
-
get(_, prop) {
|
|
46
|
-
if (typeof prop !== "string") return void 0;
|
|
47
|
-
const hasProperty = (process2) => {
|
|
48
|
-
return process2 && Object.prototype.hasOwnProperty.call(process2, prop);
|
|
49
|
-
};
|
|
50
|
-
try {
|
|
51
|
-
if (typeof process !== "undefined" && hasProperty(process.env)) {
|
|
52
|
-
return process.env[prop];
|
|
53
|
-
}
|
|
54
|
-
if (typeof import_meta !== "undefined" && hasProperty(import_meta.env)) {
|
|
55
|
-
return import_meta.env[prop];
|
|
56
|
-
}
|
|
57
|
-
if (typeof Deno !== "undefined" && Deno.env?.get) {
|
|
58
|
-
return Deno.env.get(prop);
|
|
59
|
-
}
|
|
60
|
-
if (typeof Bun !== "undefined" && hasProperty(Bun.env)) {
|
|
61
|
-
return Bun.env[prop];
|
|
62
|
-
}
|
|
63
|
-
const globalValue = globalThis[prop];
|
|
64
|
-
return typeof globalValue === "string" ? globalValue : void 0;
|
|
65
|
-
} catch {
|
|
66
|
-
return void 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
var getEnv = (key) => {
|
|
71
|
-
const keys = [`AURA_AUTH_${key.toUpperCase()}`, `AURA_${key.toUpperCase()}`, `AUTH_${key.toUpperCase()}`, key.toUpperCase()];
|
|
72
|
-
return env[keys.find((k) => env[k]) ?? ""];
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
// src/assert.ts
|
|
76
|
-
var import_crypto = require("@aura-stack/jose/crypto");
|
|
77
|
-
|
|
78
|
-
// src/utils.ts
|
|
79
|
-
var createBasicAuthHeader = (username, password) => {
|
|
80
|
-
const getUsername = getEnv(username.toUpperCase()) ?? username;
|
|
81
|
-
const getPassword = getEnv(password.toUpperCase()) ?? password;
|
|
82
|
-
if (!getUsername || !getPassword) {
|
|
83
|
-
throw new AuthInternalError("INVALID_OAUTH_CONFIGURATION", "Missing client credentials for OAuth provider configuration.");
|
|
84
|
-
}
|
|
85
|
-
const credentials = `${getUsername}:${getPassword}`;
|
|
86
|
-
return `Basic ${btoa(credentials)}`;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
// src/oauth/notion.ts
|
|
90
|
-
var notion = (options) => {
|
|
91
|
-
return {
|
|
92
|
-
id: "notion",
|
|
93
|
-
name: "Notion",
|
|
94
|
-
authorize: {
|
|
95
|
-
url: "https://api.notion.com/v1/oauth/authorize",
|
|
96
|
-
params: {
|
|
97
|
-
owner: "user",
|
|
98
|
-
scope: "user:read",
|
|
99
|
-
responseType: "code"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
accessToken: {
|
|
103
|
-
url: "https://api.notion.com/v1/oauth/token",
|
|
104
|
-
headers: {
|
|
105
|
-
Authorization: createBasicAuthHeader(
|
|
106
|
-
options?.clientId ?? "NOTION_CLIENT_ID",
|
|
107
|
-
options?.clientSecret ?? "NOTION_CLIENT_SECRET"
|
|
108
|
-
)
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
userInfo: {
|
|
112
|
-
url: "https://api.notion.com/v1/users/me",
|
|
113
|
-
headers: {
|
|
114
|
-
"Notion-Version": "2022-06-28"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
profile(profile) {
|
|
118
|
-
return {
|
|
119
|
-
sub: profile.id,
|
|
120
|
-
name: profile.name,
|
|
121
|
-
image: profile.avatar_url ?? "",
|
|
122
|
-
email: profile?.bot?.owner?.user?.person?.email
|
|
123
|
-
};
|
|
124
|
-
},
|
|
125
|
-
...options
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
129
|
-
0 && (module.exports = {
|
|
130
|
-
notion
|
|
131
|
-
});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../assert-hDwQ_SPO.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.S(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;
|
package/dist/oauth/notion.d.ts
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../schemas.js';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '@aura-stack/jose';
|
|
6
|
-
import '@aura-stack/jose/jose';
|
|
7
|
-
import '@aura-stack/jose/crypto';
|
|
8
|
-
import '@aura-stack/router/cookie';
|
|
9
|
-
import '../@types/utility.js';
|
|
10
|
-
import 'jose';
|
|
11
|
-
import '@aura-stack/router';
|
|
12
|
-
import 'zod/v4/core';
|
|
1
|
+
import { An as NotionUser, Mn as Person, Nn as notion, On as Bot, jn as Owner, kn as NotionProfile } from "../index-C9U6ICDT.js";
|
|
2
|
+
export { Bot, NotionProfile, NotionUser, Owner, Person, notion };
|
package/dist/oauth/notion.js
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
notion
|
|
3
|
-
} from "../chunk-PHYNROD4.js";
|
|
4
|
-
import "../chunk-LX3TJ2TJ.js";
|
|
5
|
-
import "../chunk-WHNDRO3N.js";
|
|
6
|
-
import "../chunk-U5663F2U.js";
|
|
7
|
-
export {
|
|
8
|
-
notion
|
|
9
|
-
};
|
|
1
|
+
import{S as e}from"../assert-_fBNnaOk.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,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import 'zod';
|
|
4
|
-
import '../schemas.js';
|
|
5
|
-
import 'zod/v4';
|
|
6
|
-
import '@aura-stack/jose';
|
|
7
|
-
import '@aura-stack/jose/jose';
|
|
8
|
-
import '@aura-stack/jose/crypto';
|
|
9
|
-
import '@aura-stack/router/cookie';
|
|
10
|
-
import 'jose';
|
|
11
|
-
import '@aura-stack/router';
|
|
12
|
-
import 'zod/v4/core';
|
|
1
|
+
import { In as PinterestProfile, Ln as pinterest } from "../index-C9U6ICDT.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,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../schemas.js';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '@aura-stack/jose';
|
|
6
|
-
import '@aura-stack/jose/jose';
|
|
7
|
-
import '@aura-stack/jose/crypto';
|
|
8
|
-
import '@aura-stack/router/cookie';
|
|
9
|
-
import '../@types/utility.js';
|
|
10
|
-
import 'jose';
|
|
11
|
-
import '@aura-stack/router';
|
|
12
|
-
import 'zod/v4/core';
|
|
1
|
+
import { Jn as SpotifyProfile, Yn as spotify, qn as SpotifyImage } from "../index-C9U6ICDT.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,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../schemas.js';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '@aura-stack/jose';
|
|
6
|
-
import '@aura-stack/jose/jose';
|
|
7
|
-
import '@aura-stack/jose/crypto';
|
|
8
|
-
import '@aura-stack/router/cookie';
|
|
9
|
-
import '../@types/utility.js';
|
|
10
|
-
import 'jose';
|
|
11
|
-
import '@aura-stack/router';
|
|
12
|
-
import 'zod/v4/core';
|
|
1
|
+
import { Hn as SummaryClub, Un as SummaryGear, Vn as StravaProfile, Wn as strava } from "../index-C9U6ICDT.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};
|
package/dist/oauth/twitch.cjs
CHANGED
|
@@ -1,95 +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/twitch.ts
|
|
21
|
-
var twitch_exports = {};
|
|
22
|
-
__export(twitch_exports, {
|
|
23
|
-
twitch: () => twitch
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(twitch_exports);
|
|
26
|
-
|
|
27
|
-
// src/env.ts
|
|
28
|
-
var import_meta = {};
|
|
29
|
-
var env = new Proxy({}, {
|
|
30
|
-
get(_, prop) {
|
|
31
|
-
if (typeof prop !== "string") return void 0;
|
|
32
|
-
const hasProperty = (process2) => {
|
|
33
|
-
return process2 && Object.prototype.hasOwnProperty.call(process2, prop);
|
|
34
|
-
};
|
|
35
|
-
try {
|
|
36
|
-
if (typeof process !== "undefined" && hasProperty(process.env)) {
|
|
37
|
-
return process.env[prop];
|
|
38
|
-
}
|
|
39
|
-
if (typeof import_meta !== "undefined" && hasProperty(import_meta.env)) {
|
|
40
|
-
return import_meta.env[prop];
|
|
41
|
-
}
|
|
42
|
-
if (typeof Deno !== "undefined" && Deno.env?.get) {
|
|
43
|
-
return Deno.env.get(prop);
|
|
44
|
-
}
|
|
45
|
-
if (typeof Bun !== "undefined" && hasProperty(Bun.env)) {
|
|
46
|
-
return Bun.env[prop];
|
|
47
|
-
}
|
|
48
|
-
const globalValue = globalThis[prop];
|
|
49
|
-
return typeof globalValue === "string" ? globalValue : void 0;
|
|
50
|
-
} catch {
|
|
51
|
-
return void 0;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
var getEnv = (key) => {
|
|
56
|
-
const keys = [`AURA_AUTH_${key.toUpperCase()}`, `AURA_${key.toUpperCase()}`, `AUTH_${key.toUpperCase()}`, key.toUpperCase()];
|
|
57
|
-
return env[keys.find((k) => env[k]) ?? ""];
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
// src/oauth/twitch.ts
|
|
61
|
-
var twitch = (options) => {
|
|
62
|
-
const clientId = options?.clientId ?? getEnv("TWITCH_CLIENT_ID");
|
|
63
|
-
return {
|
|
64
|
-
id: "twitch",
|
|
65
|
-
name: "Twitch",
|
|
66
|
-
authorize: {
|
|
67
|
-
url: "https://id.twitch.tv/oauth2/authorize",
|
|
68
|
-
params: { scope: "user:read:email", responseType: "code" }
|
|
69
|
-
},
|
|
70
|
-
accessToken: "https://id.twitch.tv/oauth2/token",
|
|
71
|
-
userInfo: {
|
|
72
|
-
url: "https://api.twitch.tv/helix/users",
|
|
73
|
-
headers: {
|
|
74
|
-
"Client-ID": clientId
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
profile(profile) {
|
|
78
|
-
const user = profile.data[0];
|
|
79
|
-
if (!user) {
|
|
80
|
-
throw new Error("No user data found in Twitch profile response");
|
|
81
|
-
}
|
|
82
|
-
return {
|
|
83
|
-
sub: user.id,
|
|
84
|
-
name: user.display_name,
|
|
85
|
-
email: user.email,
|
|
86
|
-
picture: user.profile_image_url
|
|
87
|
-
};
|
|
88
|
-
},
|
|
89
|
-
...options
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
-
0 && (module.exports = {
|
|
94
|
-
twitch
|
|
95
|
-
});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../env-7as-tgzO.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;
|
package/dist/oauth/twitch.d.ts
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../schemas.js';
|
|
4
|
-
import 'zod/v4';
|
|
5
|
-
import '@aura-stack/jose';
|
|
6
|
-
import '@aura-stack/jose/jose';
|
|
7
|
-
import '@aura-stack/jose/crypto';
|
|
8
|
-
import '@aura-stack/router/cookie';
|
|
9
|
-
import '../@types/utility.js';
|
|
10
|
-
import 'jose';
|
|
11
|
-
import '@aura-stack/router';
|
|
12
|
-
import 'zod/v4/core';
|
|
1
|
+
import { Fn as twitch, Pn as TwitchProfile } from "../index-C9U6ICDT.js";
|
|
2
|
+
export { TwitchProfile, twitch };
|
package/dist/oauth/twitch.js
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
twitch
|
|
3
|
-
} from "../chunk-2GQLSIJ2.js";
|
|
4
|
-
import "../chunk-WHNDRO3N.js";
|
|
5
|
-
export {
|
|
6
|
-
twitch
|
|
7
|
-
};
|
|
1
|
+
import{n as e}from"../env-CJtSi1eX.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};
|