@aura-stack/auth 0.4.0-rc.4 → 0.4.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/dist/@types/index.d.ts +4 -3
- package/dist/@types/router.d.cjs +0 -17
- package/dist/@types/router.d.d.ts +3 -2
- package/dist/@types/router.d.js +0 -1
- package/dist/actions/callback/access-token.cjs +40 -25
- package/dist/actions/callback/access-token.d.ts +4 -3
- package/dist/actions/callback/access-token.js +3 -4
- package/dist/actions/callback/callback.cjs +287 -77
- package/dist/actions/callback/callback.d.ts +5 -26
- package/dist/actions/callback/callback.js +13 -10
- package/dist/actions/callback/userinfo.cjs +68 -7
- package/dist/actions/callback/userinfo.d.ts +4 -3
- package/dist/actions/callback/userinfo.js +8 -6
- package/dist/actions/csrfToken/csrfToken.cjs +63 -4
- package/dist/actions/csrfToken/csrfToken.d.ts +1 -3
- package/dist/actions/csrfToken/csrfToken.js +8 -6
- package/dist/actions/index.cjs +400 -175
- package/dist/actions/index.d.ts +3 -2
- package/dist/actions/index.js +21 -19
- package/dist/actions/session/session.cjs +40 -11
- package/dist/actions/session/session.d.ts +1 -3
- package/dist/actions/session/session.js +4 -4
- package/dist/actions/signIn/authorization.cjs +171 -132
- package/dist/actions/signIn/authorization.d.ts +21 -11
- package/dist/actions/signIn/authorization.js +8 -6
- package/dist/actions/signIn/signIn.cjs +220 -113
- package/dist/actions/signIn/signIn.d.ts +5 -25
- package/dist/actions/signIn/signIn.js +9 -7
- package/dist/actions/signOut/signOut.cjs +268 -119
- package/dist/actions/signOut/signOut.d.ts +1 -9
- package/dist/actions/signOut/signOut.js +10 -8
- package/dist/assert.cjs +117 -5
- package/dist/assert.d.ts +22 -3
- package/dist/assert.js +17 -3
- package/dist/chunk-4EKY7655.js +123 -0
- package/dist/chunk-4MYWAOLG.js +31 -0
- package/dist/chunk-4YHJ4IEQ.js +25 -0
- package/dist/chunk-54CZPKR4.js +25 -0
- package/dist/chunk-5LZ7TOM3.js +25 -0
- package/dist/{chunk-W6LG7BFW.js → chunk-5W4BRQYG.js} +24 -20
- package/dist/chunk-6MXFPFR3.js +143 -0
- package/dist/{chunk-3EUWD5BB.js → chunk-7QF22LHP.js} +13 -9
- package/dist/chunk-ALG3GIV4.js +95 -0
- package/dist/chunk-E6G5YCI6.js +25 -0
- package/dist/chunk-EBAMFRB7.js +34 -0
- package/dist/chunk-EEE7UM5T.js +25 -0
- package/dist/{chunk-TLE4PXY3.js → chunk-FRJFWTOY.js} +38 -7
- package/dist/chunk-FW4W3REU.js +25 -0
- package/dist/{chunk-HT4YLL7N.js → chunk-ICAZ4OVS.js} +10 -8
- package/dist/chunk-IPKO6UQN.js +25 -0
- package/dist/{chunk-YRCB5FLE.js → chunk-KJBAQZX2.js} +13 -0
- package/dist/chunk-KMMAZFSJ.js +25 -0
- package/dist/chunk-LDU7A2JE.js +25 -0
- package/dist/{chunk-N2APGLXA.js → chunk-NUDITUKX.js} +18 -16
- package/dist/chunk-OVHNRULD.js +33 -0
- package/dist/{chunk-JVFTCTTE.js → chunk-PHFH2MGS.js} +12 -9
- package/dist/chunk-QQVSRXGX.js +149 -0
- package/dist/chunk-TM5IPSNF.js +113 -0
- package/dist/{chunk-GA2SMTJO.js → chunk-TZB6MUXN.js} +33 -13
- package/dist/chunk-VNCNJKS2.js +267 -0
- package/dist/{chunk-IVET23KF.js → chunk-XGLBNXL4.js} +31 -14
- package/dist/chunk-XUP6KKNG.js +106 -0
- package/dist/cookie.cjs +24 -20
- package/dist/cookie.d.ts +4 -3
- package/dist/cookie.js +1 -1
- package/dist/env.cjs +56 -0
- package/dist/env.d.ts +7 -0
- package/dist/env.js +6 -0
- package/dist/errors.d.ts +4 -3
- package/dist/headers.cjs +28 -2
- package/dist/headers.d.ts +25 -1
- package/dist/headers.js +9 -3
- package/dist/{index-DkaLJFn8.d.ts → index-CSyIJmCM.d.ts} +373 -45
- package/dist/index.cjs +1128 -483
- package/dist/index.d.ts +6 -10
- package/dist/index.js +83 -42
- package/dist/jose.cjs +62 -25
- package/dist/jose.d.ts +7 -5
- package/dist/jose.js +8 -6
- package/dist/logger.cjs +292 -0
- package/dist/logger.d.ts +8 -0
- package/dist/logger.js +8 -0
- package/dist/oauth/bitbucket.cjs +19 -15
- package/dist/oauth/bitbucket.d.ts +3 -2
- package/dist/oauth/bitbucket.js +1 -1
- package/dist/oauth/discord.cjs +27 -24
- package/dist/oauth/discord.d.ts +3 -2
- package/dist/oauth/discord.js +1 -1
- package/dist/oauth/figma.cjs +19 -16
- package/dist/oauth/figma.d.ts +3 -2
- package/dist/oauth/figma.js +1 -1
- package/dist/oauth/github.cjs +19 -8
- package/dist/oauth/github.d.ts +3 -2
- package/dist/oauth/github.js +1 -1
- package/dist/oauth/gitlab.cjs +19 -16
- package/dist/oauth/gitlab.d.ts +3 -2
- package/dist/oauth/gitlab.js +1 -1
- package/dist/oauth/index.cjs +266 -166
- package/dist/oauth/index.d.ts +3 -2
- package/dist/oauth/index.js +22 -21
- package/dist/oauth/mailchimp.cjs +19 -16
- package/dist/oauth/mailchimp.d.ts +3 -2
- package/dist/oauth/mailchimp.js +1 -1
- package/dist/oauth/pinterest.cjs +19 -16
- package/dist/oauth/pinterest.d.ts +3 -2
- package/dist/oauth/pinterest.js +1 -1
- package/dist/oauth/spotify.cjs +19 -16
- package/dist/oauth/spotify.d.ts +3 -2
- package/dist/oauth/spotify.js +1 -1
- package/dist/oauth/strava.cjs +19 -16
- package/dist/oauth/strava.d.ts +3 -2
- package/dist/oauth/strava.js +1 -1
- package/dist/oauth/x.cjs +19 -16
- package/dist/oauth/x.d.ts +3 -2
- package/dist/oauth/x.js +1 -1
- package/dist/schemas.cjs +16 -2
- package/dist/schemas.d.ts +17 -1
- package/dist/schemas.js +5 -3
- package/dist/secure.cjs +58 -16
- package/dist/secure.d.ts +4 -10
- package/dist/secure.js +5 -5
- package/dist/utils.cjs +94 -87
- package/dist/utils.d.ts +9 -39
- package/dist/utils.js +11 -9
- package/package.json +3 -4
- package/dist/chunk-42XB3YCW.js +0 -22
- package/dist/chunk-6R2YZ4AC.js +0 -22
- package/dist/chunk-A3N4PVAT.js +0 -70
- package/dist/chunk-B737EUJV.js +0 -22
- package/dist/chunk-CXLATHS5.js +0 -143
- package/dist/chunk-DIVDFNAP.js +0 -0
- package/dist/chunk-E3OXBRYF.js +0 -22
- package/dist/chunk-EIL2FPSS.js +0 -22
- package/dist/chunk-EMKJA2GJ.js +0 -89
- package/dist/chunk-FIPU4MLT.js +0 -21
- package/dist/chunk-FKRDCWBF.js +0 -22
- package/dist/chunk-HP34YGGJ.js +0 -22
- package/dist/chunk-IKHPGFCW.js +0 -14
- package/dist/chunk-IUYZQTJV.js +0 -30
- package/dist/chunk-KRNOMBXQ.js +0 -22
- package/dist/chunk-KSWLO5ZU.js +0 -102
- package/dist/chunk-N4SX7TZT.js +0 -96
- package/dist/chunk-STHEPPUZ.js +0 -11
package/dist/oauth/bitbucket.cjs
CHANGED
|
@@ -23,21 +23,25 @@ __export(bitbucket_exports, {
|
|
|
23
23
|
bitbucket: () => bitbucket
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(bitbucket_exports);
|
|
26
|
-
var bitbucket = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
var bitbucket = (options) => {
|
|
27
|
+
return {
|
|
28
|
+
id: "bitbucket",
|
|
29
|
+
name: "Bitbucket",
|
|
30
|
+
authorizeURL: "https://bitbucket.org/site/oauth2/authorize",
|
|
31
|
+
accessToken: "https://bitbucket.org/site/oauth2/access_token",
|
|
32
|
+
userInfo: "https://api.bitbucket.org/2.0/user",
|
|
33
|
+
scope: "account email",
|
|
34
|
+
responseType: "code",
|
|
35
|
+
profile(profile) {
|
|
36
|
+
return {
|
|
37
|
+
sub: profile.uuid ?? profile.account_id,
|
|
38
|
+
name: profile.display_name ?? profile.nickname,
|
|
39
|
+
image: profile.links.avatar?.href,
|
|
40
|
+
email: void 0
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
...options
|
|
44
|
+
};
|
|
41
45
|
};
|
|
42
46
|
// Annotate the CommonJS export names for ESM import in node:
|
|
43
47
|
0 && (module.exports = {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { H as BitbucketProfile, K as bitbucket } from '../index-CSyIJmCM.js';
|
|
2
2
|
import '../@types/utility.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import '../schemas.js';
|
|
5
|
-
import '
|
|
5
|
+
import '../jose.js';
|
|
6
6
|
import '@aura-stack/jose';
|
|
7
7
|
import '@aura-stack/jose/jose';
|
|
8
|
+
import '@aura-stack/router/cookie';
|
package/dist/oauth/bitbucket.js
CHANGED
package/dist/oauth/discord.cjs
CHANGED
|
@@ -23,30 +23,33 @@ __export(discord_exports, {
|
|
|
23
23
|
discord: () => discord
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(discord_exports);
|
|
26
|
-
var discord = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
26
|
+
var discord = (options) => {
|
|
27
|
+
return {
|
|
28
|
+
id: "discord",
|
|
29
|
+
name: "Discord",
|
|
30
|
+
authorizeURL: "https://discord.com/oauth2/authorize",
|
|
31
|
+
accessToken: "https://discord.com/api/oauth2/token",
|
|
32
|
+
userInfo: "https://discord.com/api/users/@me",
|
|
33
|
+
scope: "identify email",
|
|
34
|
+
responseType: "code",
|
|
35
|
+
profile(profile) {
|
|
36
|
+
let image = "";
|
|
37
|
+
if (profile.avatar === null) {
|
|
38
|
+
const index = profile.discriminator === "0" ? (BigInt(profile.id) >> 22n) % 6n : Number(profile.discriminator) % 5;
|
|
39
|
+
image = `https://cdn.discordapp.com/embed/avatars/${index}.png`;
|
|
40
|
+
} else {
|
|
41
|
+
const format = profile.avatar.startsWith("a_") ? "gif" : "png";
|
|
42
|
+
image = `https://cdn.discordapp.com/avatars/${profile.id}/${profile.avatar}.${format}`;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
sub: profile.id,
|
|
46
|
+
name: profile.global_name ?? profile.username,
|
|
47
|
+
email: profile.email ?? "",
|
|
48
|
+
image
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
...options
|
|
52
|
+
};
|
|
50
53
|
};
|
|
51
54
|
// Annotate the CommonJS export names for ESM import in node:
|
|
52
55
|
0 && (module.exports = {
|
package/dist/oauth/discord.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { D as DiscordProfile, N as Nameplate,
|
|
1
|
+
export { D as DiscordProfile, N as Nameplate, z as discord } from '../index-CSyIJmCM.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '../schemas.js';
|
|
4
|
-
import '
|
|
4
|
+
import '../jose.js';
|
|
5
5
|
import '@aura-stack/jose';
|
|
6
6
|
import '@aura-stack/jose/jose';
|
|
7
|
+
import '@aura-stack/router/cookie';
|
|
7
8
|
import '../@types/utility.js';
|
package/dist/oauth/discord.js
CHANGED
package/dist/oauth/figma.cjs
CHANGED
|
@@ -23,22 +23,25 @@ __export(figma_exports, {
|
|
|
23
23
|
figma: () => figma
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(figma_exports);
|
|
26
|
-
var figma = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
var figma = (options) => {
|
|
27
|
+
return {
|
|
28
|
+
id: "figma",
|
|
29
|
+
name: "Figma",
|
|
30
|
+
authorizeURL: "https://www.figma.com/oauth",
|
|
31
|
+
accessToken: "https://api.figma.com/v1/oauth/token",
|
|
32
|
+
userInfo: "https://api.figma.com/v1/me",
|
|
33
|
+
scope: "current_user:read",
|
|
34
|
+
responseType: "code",
|
|
35
|
+
profile(profile) {
|
|
36
|
+
return {
|
|
37
|
+
sub: profile.id,
|
|
38
|
+
name: profile.handle,
|
|
39
|
+
email: profile.email,
|
|
40
|
+
image: profile.img_url
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
...options
|
|
44
|
+
};
|
|
42
45
|
};
|
|
43
46
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
47
|
0 && (module.exports = {
|
package/dist/oauth/figma.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { F as FigmaProfile,
|
|
1
|
+
export { F as FigmaProfile, B as figma } from '../index-CSyIJmCM.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '../schemas.js';
|
|
4
|
-
import '
|
|
4
|
+
import '../jose.js';
|
|
5
5
|
import '@aura-stack/jose';
|
|
6
6
|
import '@aura-stack/jose/jose';
|
|
7
|
+
import '@aura-stack/router/cookie';
|
|
7
8
|
import '../@types/utility.js';
|
package/dist/oauth/figma.js
CHANGED
package/dist/oauth/github.cjs
CHANGED
|
@@ -23,14 +23,25 @@ __export(github_exports, {
|
|
|
23
23
|
github: () => github
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(github_exports);
|
|
26
|
-
var github = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
var github = (options) => {
|
|
27
|
+
return {
|
|
28
|
+
id: "github",
|
|
29
|
+
name: "GitHub",
|
|
30
|
+
authorizeURL: "https://github.com/login/oauth/authorize",
|
|
31
|
+
accessToken: "https://github.com/login/oauth/access_token",
|
|
32
|
+
userInfo: "https://api.github.com/user",
|
|
33
|
+
scope: "read:user user:email",
|
|
34
|
+
responseType: "code",
|
|
35
|
+
profile: (profile) => {
|
|
36
|
+
return {
|
|
37
|
+
sub: profile.id.toString(),
|
|
38
|
+
name: profile.name ?? profile.login,
|
|
39
|
+
email: profile.email ?? void 0,
|
|
40
|
+
image: profile.avatar_url
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
...options
|
|
44
|
+
};
|
|
34
45
|
};
|
|
35
46
|
// Annotate the CommonJS export names for ESM import in node:
|
|
36
47
|
0 && (module.exports = {
|
package/dist/oauth/github.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Q as GitHubProfile, V as github } from '../index-CSyIJmCM.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '../schemas.js';
|
|
4
|
-
import '
|
|
4
|
+
import '../jose.js';
|
|
5
5
|
import '@aura-stack/jose';
|
|
6
6
|
import '@aura-stack/jose/jose';
|
|
7
|
+
import '@aura-stack/router/cookie';
|
|
7
8
|
import '../@types/utility.js';
|
package/dist/oauth/github.js
CHANGED
package/dist/oauth/gitlab.cjs
CHANGED
|
@@ -23,22 +23,25 @@ __export(gitlab_exports, {
|
|
|
23
23
|
gitlab: () => gitlab
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(gitlab_exports);
|
|
26
|
-
var gitlab = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
var gitlab = (options) => {
|
|
27
|
+
return {
|
|
28
|
+
id: "gitlab",
|
|
29
|
+
name: "GitLab",
|
|
30
|
+
authorizeURL: "https://gitlab.com/oauth/authorize",
|
|
31
|
+
accessToken: "https://gitlab.com/oauth/token",
|
|
32
|
+
userInfo: "https://gitlab.com/api/v4/user",
|
|
33
|
+
scope: "read_user",
|
|
34
|
+
responseType: "code",
|
|
35
|
+
profile(profile) {
|
|
36
|
+
return {
|
|
37
|
+
sub: profile.id.toString(),
|
|
38
|
+
name: profile.name ?? profile.username,
|
|
39
|
+
email: profile.email,
|
|
40
|
+
image: profile.avatar_url
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
...options
|
|
44
|
+
};
|
|
42
45
|
};
|
|
43
46
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
47
|
0 && (module.exports = {
|
package/dist/oauth/gitlab.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { G as GitLabProfile,
|
|
1
|
+
export { G as GitLabProfile, y as gitlab } from '../index-CSyIJmCM.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '../schemas.js';
|
|
4
|
-
import '
|
|
4
|
+
import '../jose.js';
|
|
5
5
|
import '@aura-stack/jose';
|
|
6
6
|
import '@aura-stack/jose/jose';
|
|
7
|
+
import '@aura-stack/router/cookie';
|
|
7
8
|
import '../@types/utility.js';
|