@aura-stack/auth 0.1.0-rc.1

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.
Files changed (141) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +42 -0
  3. package/dist/@types/index.cjs +18 -0
  4. package/dist/@types/index.d.cts +9 -0
  5. package/dist/@types/index.d.ts +9 -0
  6. package/dist/@types/index.js +1 -0
  7. package/dist/@types/router.d.cjs +1 -0
  8. package/dist/@types/router.d.d.cts +16 -0
  9. package/dist/@types/router.d.d.ts +16 -0
  10. package/dist/@types/router.d.js +0 -0
  11. package/dist/@types/utility.cjs +18 -0
  12. package/dist/@types/utility.d.cts +6 -0
  13. package/dist/@types/utility.d.ts +6 -0
  14. package/dist/@types/utility.js +1 -0
  15. package/dist/actions/callback/access-token.cjs +170 -0
  16. package/dist/actions/callback/access-token.d.cts +30 -0
  17. package/dist/actions/callback/access-token.d.ts +30 -0
  18. package/dist/actions/callback/access-token.js +8 -0
  19. package/dist/actions/callback/callback.cjs +517 -0
  20. package/dist/actions/callback/callback.d.cts +13 -0
  21. package/dist/actions/callback/callback.d.ts +13 -0
  22. package/dist/actions/callback/callback.js +16 -0
  23. package/dist/actions/callback/userinfo.cjs +165 -0
  24. package/dist/actions/callback/userinfo.d.cts +22 -0
  25. package/dist/actions/callback/userinfo.d.ts +22 -0
  26. package/dist/actions/callback/userinfo.js +10 -0
  27. package/dist/actions/csrfToken/csrfToken.cjs +207 -0
  28. package/dist/actions/csrfToken/csrfToken.d.cts +5 -0
  29. package/dist/actions/csrfToken/csrfToken.d.ts +5 -0
  30. package/dist/actions/csrfToken/csrfToken.js +12 -0
  31. package/dist/actions/index.cjs +864 -0
  32. package/dist/actions/index.d.cts +14 -0
  33. package/dist/actions/index.d.ts +14 -0
  34. package/dist/actions/index.js +34 -0
  35. package/dist/actions/session/session.cjs +191 -0
  36. package/dist/actions/session/session.d.cts +5 -0
  37. package/dist/actions/session/session.d.ts +5 -0
  38. package/dist/actions/session/session.js +11 -0
  39. package/dist/actions/signIn/authorization.cjs +274 -0
  40. package/dist/actions/signIn/authorization.d.cts +45 -0
  41. package/dist/actions/signIn/authorization.d.ts +45 -0
  42. package/dist/actions/signIn/authorization.js +16 -0
  43. package/dist/actions/signIn/signIn.cjs +469 -0
  44. package/dist/actions/signIn/signIn.d.cts +13 -0
  45. package/dist/actions/signIn/signIn.d.ts +13 -0
  46. package/dist/actions/signIn/signIn.js +14 -0
  47. package/dist/actions/signOut/signOut.cjs +490 -0
  48. package/dist/actions/signOut/signOut.d.cts +8 -0
  49. package/dist/actions/signOut/signOut.d.ts +8 -0
  50. package/dist/actions/signOut/signOut.js +15 -0
  51. package/dist/assert.cjs +44 -0
  52. package/dist/assert.d.ts +5 -0
  53. package/dist/assert.js +10 -0
  54. package/dist/chunk-256KIVJL.js +99 -0
  55. package/dist/chunk-42XB3YCW.js +22 -0
  56. package/dist/chunk-6SM22VVJ.js +18 -0
  57. package/dist/chunk-CAKJT3KS.js +92 -0
  58. package/dist/chunk-E3OXBRYF.js +22 -0
  59. package/dist/chunk-EBPE35JT.js +31 -0
  60. package/dist/chunk-FIPU4MLT.js +21 -0
  61. package/dist/chunk-FJUDBLCP.js +59 -0
  62. package/dist/chunk-FKRDCWBF.js +22 -0
  63. package/dist/chunk-GZU3RBTB.js +62 -0
  64. package/dist/chunk-HGJ4TXY4.js +137 -0
  65. package/dist/chunk-HMRKN75I.js +74 -0
  66. package/dist/chunk-IKHPGFCW.js +14 -0
  67. package/dist/chunk-ITQ7352M.js +0 -0
  68. package/dist/chunk-JAPMIE6S.js +10 -0
  69. package/dist/chunk-KRNOMBXQ.js +22 -0
  70. package/dist/chunk-LLR722CL.js +96 -0
  71. package/dist/chunk-PG7UYFG5.js +0 -0
  72. package/dist/chunk-RLT4RFKV.js +45 -0
  73. package/dist/chunk-SJPDVKUS.js +112 -0
  74. package/dist/chunk-SMQO5WD7.js +30 -0
  75. package/dist/chunk-STHEPPUZ.js +11 -0
  76. package/dist/chunk-UJJ7R56J.js +52 -0
  77. package/dist/chunk-VFTYH33W.js +61 -0
  78. package/dist/chunk-X7M4CQTN.js +25 -0
  79. package/dist/chunk-XXJKNKGQ.js +37 -0
  80. package/dist/chunk-ZV4BH47P.js +154 -0
  81. package/dist/cookie.cjs +201 -0
  82. package/dist/cookie.d.ts +95 -0
  83. package/dist/cookie.js +36 -0
  84. package/dist/error.cjs +88 -0
  85. package/dist/error.d.ts +64 -0
  86. package/dist/error.js +16 -0
  87. package/dist/headers.cjs +35 -0
  88. package/dist/headers.d.ts +9 -0
  89. package/dist/headers.js +6 -0
  90. package/dist/index-CGRZ0wrw.d.ts +530 -0
  91. package/dist/index.cjs +1089 -0
  92. package/dist/index.d.ts +43 -0
  93. package/dist/index.js +75 -0
  94. package/dist/jose.cjs +68 -0
  95. package/dist/jose.d.ts +20 -0
  96. package/dist/jose.js +9 -0
  97. package/dist/oauth/bitbucket.cjs +45 -0
  98. package/dist/oauth/bitbucket.d.cts +9 -0
  99. package/dist/oauth/bitbucket.d.ts +9 -0
  100. package/dist/oauth/bitbucket.js +6 -0
  101. package/dist/oauth/discord.cjs +55 -0
  102. package/dist/oauth/discord.d.cts +9 -0
  103. package/dist/oauth/discord.d.ts +9 -0
  104. package/dist/oauth/discord.js +6 -0
  105. package/dist/oauth/figma.cjs +46 -0
  106. package/dist/oauth/figma.d.cts +9 -0
  107. package/dist/oauth/figma.d.ts +9 -0
  108. package/dist/oauth/figma.js +6 -0
  109. package/dist/oauth/github.cjs +38 -0
  110. package/dist/oauth/github.d.cts +9 -0
  111. package/dist/oauth/github.d.ts +9 -0
  112. package/dist/oauth/github.js +6 -0
  113. package/dist/oauth/gitlab.cjs +46 -0
  114. package/dist/oauth/gitlab.d.cts +9 -0
  115. package/dist/oauth/gitlab.d.ts +9 -0
  116. package/dist/oauth/gitlab.js +6 -0
  117. package/dist/oauth/index.cjs +213 -0
  118. package/dist/oauth/index.d.cts +9 -0
  119. package/dist/oauth/index.d.ts +9 -0
  120. package/dist/oauth/index.js +36 -0
  121. package/dist/oauth/spotify.cjs +46 -0
  122. package/dist/oauth/spotify.d.cts +9 -0
  123. package/dist/oauth/spotify.d.ts +9 -0
  124. package/dist/oauth/spotify.js +6 -0
  125. package/dist/oauth/x.cjs +46 -0
  126. package/dist/oauth/x.d.cts +9 -0
  127. package/dist/oauth/x.d.ts +9 -0
  128. package/dist/oauth/x.js +6 -0
  129. package/dist/response.cjs +34 -0
  130. package/dist/response.d.ts +10 -0
  131. package/dist/response.js +6 -0
  132. package/dist/schemas.cjs +105 -0
  133. package/dist/schemas.d.ts +130 -0
  134. package/dist/schemas.js +20 -0
  135. package/dist/secure.cjs +120 -0
  136. package/dist/secure.d.ts +43 -0
  137. package/dist/secure.js +18 -0
  138. package/dist/utils.cjs +141 -0
  139. package/dist/utils.d.ts +45 -0
  140. package/dist/utils.js +23 -0
  141. package/package.json +70 -0
@@ -0,0 +1,213 @@
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 __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/index.ts
21
+ var oauth_exports = {};
22
+ __export(oauth_exports, {
23
+ bitbucket: () => bitbucket,
24
+ builtInOAuthProviders: () => builtInOAuthProviders,
25
+ createBuiltInOAuthProviders: () => createBuiltInOAuthProviders,
26
+ discord: () => discord,
27
+ figma: () => figma,
28
+ github: () => github,
29
+ gitlab: () => gitlab,
30
+ spotify: () => spotify,
31
+ x: () => x
32
+ });
33
+ module.exports = __toCommonJS(oauth_exports);
34
+
35
+ // src/oauth/github.ts
36
+ var github = {
37
+ id: "github",
38
+ name: "GitHub",
39
+ authorizeURL: "https://github.com/login/oauth/authorize",
40
+ accessToken: "https://github.com/login/oauth/access_token",
41
+ userInfo: "https://api.github.com/user",
42
+ scope: "read:user user:email",
43
+ responseType: "code"
44
+ };
45
+
46
+ // src/oauth/bitbucket.ts
47
+ var bitbucket = {
48
+ id: "bitbucket",
49
+ name: "Bitbucket",
50
+ authorizeURL: "https://bitbucket.org/site/oauth2/authorize",
51
+ accessToken: "https://bitbucket.org/site/oauth2/access_token",
52
+ userInfo: "https://api.bitbucket.org/2.0/user",
53
+ scope: "account email",
54
+ responseType: "code",
55
+ profile(profile) {
56
+ return {
57
+ sub: profile.uuid ?? profile.account_id,
58
+ name: profile.display_name ?? profile.nickname,
59
+ image: profile.links.avatar.href
60
+ };
61
+ }
62
+ };
63
+
64
+ // src/oauth/figma.ts
65
+ var figma = {
66
+ id: "figma",
67
+ name: "Figma",
68
+ authorizeURL: "https://www.figma.com/oauth",
69
+ accessToken: "https://api.figma.com/v1/oauth/token",
70
+ userInfo: "https://api.figma.com/v1/me",
71
+ scope: "current_user:read",
72
+ responseType: "code",
73
+ profile(profile) {
74
+ return {
75
+ sub: profile.id,
76
+ name: profile.handle,
77
+ email: profile.email,
78
+ image: profile.img_url
79
+ };
80
+ }
81
+ };
82
+
83
+ // src/oauth/discord.ts
84
+ var discord = {
85
+ id: "discord",
86
+ name: "Discord",
87
+ authorizeURL: "https://discord.com/oauth2/authorize",
88
+ accessToken: "https://discord.com/api/oauth2/token",
89
+ userInfo: "https://discord.com/api/users/@me",
90
+ scope: "identify email",
91
+ responseType: "code",
92
+ profile(profile) {
93
+ let image = "";
94
+ if (profile.avatar === null) {
95
+ const index = profile.discriminator === "0" ? (BigInt(profile.id) >> 22n) % 6n : Number(profile.discriminator) % 5;
96
+ image = `https://cdn.discordapp.com/embed/avatars/${index}.png`;
97
+ } else {
98
+ const format = profile.avatar.startsWith("a_") ? "gif" : "png";
99
+ image = `https://cdn.discordapp.com/avatars/${profile.id}/${profile.avatar}.${format}`;
100
+ }
101
+ return {
102
+ sub: profile.id,
103
+ // https://discord.com/developers/docs/change-log#display-names
104
+ name: profile.global_name ?? profile.username,
105
+ email: profile.email ?? "",
106
+ image
107
+ };
108
+ }
109
+ };
110
+
111
+ // src/oauth/gitlab.ts
112
+ var gitlab = {
113
+ id: "gitlab",
114
+ name: "GitLab",
115
+ authorizeURL: "https://gitlab.com/oauth/authorize",
116
+ accessToken: "https://gitlab.com/oauth/token",
117
+ userInfo: "https://gitlab.com/api/v4/user",
118
+ scope: "read_user",
119
+ responseType: "code",
120
+ profile(profile) {
121
+ return {
122
+ sub: profile.id.toString(),
123
+ name: profile.name ?? profile.username,
124
+ email: profile.email,
125
+ avatar: profile.avatar_url
126
+ };
127
+ }
128
+ };
129
+
130
+ // src/oauth/spotify.ts
131
+ var spotify = {
132
+ id: "spotify",
133
+ name: "Spotify",
134
+ authorizeURL: "https://accounts.spotify.com/authorize",
135
+ accessToken: "https://accounts.spotify.com/api/token",
136
+ userInfo: "https://api.spotify.com/v1/me",
137
+ scope: "user-read-email user-read-private",
138
+ responseType: "token",
139
+ profile(profile) {
140
+ return {
141
+ sub: profile.id,
142
+ name: profile.display_name,
143
+ email: profile.email,
144
+ image: profile.images?.[0]?.url
145
+ };
146
+ }
147
+ };
148
+
149
+ // src/oauth/x.ts
150
+ var x = {
151
+ id: "x",
152
+ name: "X",
153
+ authorizeURL: "https://x.com/i/oauth2/authorize",
154
+ accessToken: "https://api.x.com/2/oauth2/token",
155
+ userInfo: "https://api.x.com/2/users/me?user.fields=profile_image_url",
156
+ scope: "users.read users.email tweet.read offline.access",
157
+ responseType: "code",
158
+ profile({ data }) {
159
+ return {
160
+ sub: data.id,
161
+ name: data.name,
162
+ image: data.profile_image_url,
163
+ email: ""
164
+ };
165
+ }
166
+ };
167
+
168
+ // src/oauth/index.ts
169
+ var builtInOAuthProviders = {
170
+ github,
171
+ bitbucket,
172
+ figma,
173
+ discord,
174
+ gitlab,
175
+ spotify,
176
+ x
177
+ };
178
+ var defineOAuthEnvironment = (oauth) => {
179
+ const env = process.env;
180
+ return {
181
+ clientId: env[`AURA_AUTH_${oauth.toUpperCase()}_CLIENT_ID`],
182
+ clientSecret: env[`AURA_AUTH_${oauth.toUpperCase()}_CLIENT_SECRET`]
183
+ };
184
+ };
185
+ var defineOAuthProviderConfig = (config) => {
186
+ if (typeof config === "string") {
187
+ const definition = defineOAuthEnvironment(config);
188
+ const oauthConfig = builtInOAuthProviders[config];
189
+ return {
190
+ ...oauthConfig,
191
+ ...definition
192
+ };
193
+ }
194
+ return config;
195
+ };
196
+ var createBuiltInOAuthProviders = (oauth = []) => {
197
+ return oauth.reduce((previous, config) => {
198
+ const oauthConfig = defineOAuthProviderConfig(config);
199
+ return { ...previous, [oauthConfig.id]: oauthConfig };
200
+ }, {});
201
+ };
202
+ // Annotate the CommonJS export names for ESM import in node:
203
+ 0 && (module.exports = {
204
+ bitbucket,
205
+ builtInOAuthProviders,
206
+ createBuiltInOAuthProviders,
207
+ discord,
208
+ figma,
209
+ github,
210
+ gitlab,
211
+ spotify,
212
+ x
213
+ });
@@ -0,0 +1,9 @@
1
+ export { B as BitbucketProfile, l as BuiltInOAuthProvider, D as DiscordProfile, F as FigmaProfile, i as GitHubProfile, G as GitLabProfile, N as Nameplate, S as SpotifyProfile, X as XProfile, h as bitbucket, k as builtInOAuthProviders, d as createBuiltInOAuthProviders, e as discord, f as figma, j as github, g as gitlab, s as spotify, x } from '../index-B1vDUGwh.cjs';
2
+ import '../@types/utility.cjs';
3
+ import 'zod/v4';
4
+ import '../jose.cjs';
5
+ import '@aura-stack/jose/jose';
6
+ import '../schemas.cjs';
7
+ import 'zod/v4/core';
8
+ import '@aura-stack/router';
9
+ import 'cookie';
@@ -0,0 +1,9 @@
1
+ export { B as BitbucketProfile, l as BuiltInOAuthProvider, D as DiscordProfile, F as FigmaProfile, i as GitHubProfile, G as GitLabProfile, N as Nameplate, S as SpotifyProfile, X as XProfile, h as bitbucket, k as builtInOAuthProviders, d as createBuiltInOAuthProviders, e as discord, f as figma, j as github, g as gitlab, s as spotify, x } from '../index-CGRZ0wrw.js';
2
+ import '../@types/utility.js';
3
+ import 'zod/v4';
4
+ import '../jose.js';
5
+ import '@aura-stack/jose/jose';
6
+ import '../schemas.js';
7
+ import 'zod/v4/core';
8
+ import '@aura-stack/router';
9
+ import 'cookie';
@@ -0,0 +1,36 @@
1
+ import {
2
+ builtInOAuthProviders,
3
+ createBuiltInOAuthProviders
4
+ } from "../chunk-VFTYH33W.js";
5
+ import {
6
+ figma
7
+ } from "../chunk-FKRDCWBF.js";
8
+ import {
9
+ github
10
+ } from "../chunk-IKHPGFCW.js";
11
+ import {
12
+ gitlab
13
+ } from "../chunk-KRNOMBXQ.js";
14
+ import {
15
+ spotify
16
+ } from "../chunk-E3OXBRYF.js";
17
+ import {
18
+ x
19
+ } from "../chunk-42XB3YCW.js";
20
+ import {
21
+ bitbucket
22
+ } from "../chunk-FIPU4MLT.js";
23
+ import {
24
+ discord
25
+ } from "../chunk-EBPE35JT.js";
26
+ export {
27
+ bitbucket,
28
+ builtInOAuthProviders,
29
+ createBuiltInOAuthProviders,
30
+ discord,
31
+ figma,
32
+ github,
33
+ gitlab,
34
+ spotify,
35
+ x
36
+ };
@@ -0,0 +1,46 @@
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 __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 = {
27
+ id: "spotify",
28
+ name: "Spotify",
29
+ authorizeURL: "https://accounts.spotify.com/authorize",
30
+ accessToken: "https://accounts.spotify.com/api/token",
31
+ userInfo: "https://api.spotify.com/v1/me",
32
+ scope: "user-read-email user-read-private",
33
+ responseType: "token",
34
+ profile(profile) {
35
+ return {
36
+ sub: profile.id,
37
+ name: profile.display_name,
38
+ email: profile.email,
39
+ image: profile.images?.[0]?.url
40
+ };
41
+ }
42
+ };
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ spotify
46
+ });
@@ -0,0 +1,9 @@
1
+ export { S as SpotifyProfile, s as spotify } from '../index-B1vDUGwh.cjs';
2
+ import 'zod/v4';
3
+ import '../jose.cjs';
4
+ import '@aura-stack/jose/jose';
5
+ import '../schemas.cjs';
6
+ import 'zod/v4/core';
7
+ import '@aura-stack/router';
8
+ import 'cookie';
9
+ import '../@types/utility.cjs';
@@ -0,0 +1,9 @@
1
+ export { S as SpotifyProfile, s as spotify } from '../index-CGRZ0wrw.js';
2
+ import 'zod/v4';
3
+ import '../jose.js';
4
+ import '@aura-stack/jose/jose';
5
+ import '../schemas.js';
6
+ import 'zod/v4/core';
7
+ import '@aura-stack/router';
8
+ import 'cookie';
9
+ import '../@types/utility.js';
@@ -0,0 +1,6 @@
1
+ import {
2
+ spotify
3
+ } from "../chunk-E3OXBRYF.js";
4
+ export {
5
+ spotify
6
+ };
@@ -0,0 +1,46 @@
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 __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 = {
27
+ id: "x",
28
+ name: "X",
29
+ authorizeURL: "https://x.com/i/oauth2/authorize",
30
+ accessToken: "https://api.x.com/2/oauth2/token",
31
+ userInfo: "https://api.x.com/2/users/me?user.fields=profile_image_url",
32
+ scope: "users.read users.email tweet.read offline.access",
33
+ responseType: "code",
34
+ profile({ data }) {
35
+ return {
36
+ sub: data.id,
37
+ name: data.name,
38
+ image: data.profile_image_url,
39
+ email: ""
40
+ };
41
+ }
42
+ };
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ x
46
+ });
@@ -0,0 +1,9 @@
1
+ export { X as XProfile, x } from '../index-B1vDUGwh.cjs';
2
+ import 'zod/v4';
3
+ import '../jose.cjs';
4
+ import '@aura-stack/jose/jose';
5
+ import '../schemas.cjs';
6
+ import 'zod/v4/core';
7
+ import '@aura-stack/router';
8
+ import 'cookie';
9
+ import '../@types/utility.cjs';
@@ -0,0 +1,9 @@
1
+ export { X as XProfile, x } from '../index-CGRZ0wrw.js';
2
+ import 'zod/v4';
3
+ import '../jose.js';
4
+ import '@aura-stack/jose/jose';
5
+ import '../schemas.js';
6
+ import 'zod/v4/core';
7
+ import '@aura-stack/router';
8
+ import 'cookie';
9
+ import '../@types/utility.js';
@@ -0,0 +1,6 @@
1
+ import {
2
+ x
3
+ } from "../chunk-42XB3YCW.js";
4
+ export {
5
+ x
6
+ };
@@ -0,0 +1,34 @@
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 __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/response.ts
21
+ var response_exports = {};
22
+ __export(response_exports, {
23
+ AuraResponse: () => AuraResponse
24
+ });
25
+ module.exports = __toCommonJS(response_exports);
26
+ var AuraResponse = class extends Response {
27
+ static json(body, init) {
28
+ return Response.json(body, init);
29
+ }
30
+ };
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ AuraResponse
34
+ });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Custom Response class for Aura Auth.
3
+ *
4
+ * @experimental
5
+ */
6
+ declare class AuraResponse extends Response {
7
+ static json<T>(body: T, init?: ResponseInit): Response;
8
+ }
9
+
10
+ export { AuraResponse };
@@ -0,0 +1,6 @@
1
+ import {
2
+ AuraResponse
3
+ } from "./chunk-JAPMIE6S.js";
4
+ export {
5
+ AuraResponse
6
+ };
@@ -0,0 +1,105 @@
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 __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/schemas.ts
21
+ var schemas_exports = {};
22
+ __export(schemas_exports, {
23
+ OAuthAccessToken: () => OAuthAccessToken,
24
+ OAuthAccessTokenErrorResponse: () => OAuthAccessTokenErrorResponse,
25
+ OAuthAccessTokenResponse: () => OAuthAccessTokenResponse,
26
+ OAuthAuthorization: () => OAuthAuthorization,
27
+ OAuthAuthorizationErrorResponse: () => OAuthAuthorizationErrorResponse,
28
+ OAuthAuthorizationResponse: () => OAuthAuthorizationResponse,
29
+ OAuthErrorResponse: () => OAuthErrorResponse,
30
+ OAuthProviderConfigSchema: () => OAuthProviderConfigSchema
31
+ });
32
+ module.exports = __toCommonJS(schemas_exports);
33
+ var import_v4 = require("zod/v4");
34
+ var OAuthProviderConfigSchema = (0, import_v4.object)({
35
+ authorizeURL: (0, import_v4.url)(),
36
+ accessToken: (0, import_v4.url)(),
37
+ scope: (0, import_v4.string)().optional(),
38
+ userInfo: (0, import_v4.url)(),
39
+ responseType: (0, import_v4.enum)(["code", "token", "id_token"]),
40
+ clientId: (0, import_v4.string)(),
41
+ clientSecret: (0, import_v4.string)()
42
+ });
43
+ var OAuthAuthorization = OAuthProviderConfigSchema.extend({
44
+ redirectURI: (0, import_v4.string)(),
45
+ state: (0, import_v4.string)(),
46
+ codeChallenge: (0, import_v4.string)(),
47
+ codeChallengeMethod: (0, import_v4.enum)(["plain", "S256"])
48
+ });
49
+ var OAuthAuthorizationResponse = (0, import_v4.object)({
50
+ state: (0, import_v4.string)(),
51
+ code: (0, import_v4.string)()
52
+ });
53
+ var OAuthAuthorizationErrorResponse = (0, import_v4.object)({
54
+ error: (0, import_v4.enum)([
55
+ "invalid_request",
56
+ "unauthorized_client",
57
+ "access_denied",
58
+ "unsupported_response_type",
59
+ "invalid_scope",
60
+ "server_error",
61
+ "temporarily_unavailable"
62
+ ]),
63
+ error_description: (0, import_v4.string)().optional(),
64
+ error_uri: (0, import_v4.string)().optional(),
65
+ state: (0, import_v4.string)()
66
+ });
67
+ var OAuthAccessToken = OAuthProviderConfigSchema.extend({
68
+ redirectURI: (0, import_v4.string)(),
69
+ code: (0, import_v4.string)(),
70
+ codeVerifier: (0, import_v4.string)().min(43).max(128)
71
+ });
72
+ var OAuthAccessTokenResponse = (0, import_v4.object)({
73
+ access_token: (0, import_v4.string)(),
74
+ token_type: (0, import_v4.string)(),
75
+ expires_in: (0, import_v4.number)().optional(),
76
+ refresh_token: (0, import_v4.string)().optional(),
77
+ scope: (0, import_v4.string)().optional()
78
+ });
79
+ var OAuthAccessTokenErrorResponse = (0, import_v4.object)({
80
+ error: (0, import_v4.enum)([
81
+ "invalid_request",
82
+ "invalid_client",
83
+ "invalid_grant",
84
+ "unauthorized_client",
85
+ "unsupported_grant_type",
86
+ "invalid_scope"
87
+ ]),
88
+ error_description: (0, import_v4.string)().optional(),
89
+ error_uri: (0, import_v4.string)().optional()
90
+ });
91
+ var OAuthErrorResponse = (0, import_v4.object)({
92
+ error: (0, import_v4.string)(),
93
+ error_description: (0, import_v4.string)().optional()
94
+ });
95
+ // Annotate the CommonJS export names for ESM import in node:
96
+ 0 && (module.exports = {
97
+ OAuthAccessToken,
98
+ OAuthAccessTokenErrorResponse,
99
+ OAuthAccessTokenResponse,
100
+ OAuthAuthorization,
101
+ OAuthAuthorizationErrorResponse,
102
+ OAuthAuthorizationResponse,
103
+ OAuthErrorResponse,
104
+ OAuthProviderConfigSchema
105
+ });