@aura-stack/auth 0.1.0-rc.7 → 0.1.0-rc.9
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.cjs +15 -15
- package/dist/@types/index.d.ts +31 -7
- package/dist/@types/index.js +1 -1
- package/dist/@types/router.d.cjs +1 -1
- package/dist/@types/router.d.d.ts +7 -7
- package/dist/@types/utility.cjs +15 -15
- package/dist/@types/utility.d.ts +6 -6
- package/dist/@types/utility.js +1 -1
- package/dist/actions/callback/access-token.cjs +143 -143
- package/dist/actions/callback/access-token.d.ts +20 -15
- package/dist/actions/callback/access-token.js +4 -8
- package/dist/actions/callback/callback.cjs +455 -437
- package/dist/actions/callback/callback.d.ts +12 -10
- package/dist/actions/callback/callback.js +12 -16
- package/dist/actions/callback/userinfo.cjs +134 -131
- package/dist/actions/callback/userinfo.d.ts +9 -9
- package/dist/actions/callback/userinfo.js +6 -10
- package/dist/actions/csrfToken/csrfToken.cjs +171 -162
- package/dist/actions/csrfToken/csrfToken.d.ts +3 -3
- package/dist/actions/csrfToken/csrfToken.js +8 -12
- package/dist/actions/index.cjs +773 -746
- package/dist/actions/index.d.ts +13 -13
- package/dist/actions/index.js +18 -34
- package/dist/actions/session/session.cjs +155 -149
- package/dist/actions/session/session.d.ts +3 -3
- package/dist/actions/session/session.js +7 -11
- package/dist/actions/signIn/authorization.cjs +249 -231
- package/dist/actions/signIn/authorization.d.ts +18 -12
- package/dist/actions/signIn/authorization.js +6 -16
- package/dist/actions/signIn/signIn.cjs +423 -396
- package/dist/actions/signIn/signIn.d.ts +10 -10
- package/dist/actions/signIn/signIn.js +10 -14
- package/dist/actions/signOut/signOut.cjs +440 -417
- package/dist/actions/signOut/signOut.d.ts +3 -3
- package/dist/actions/signOut/signOut.js +11 -15
- package/dist/assert.cjs +36 -35
- package/dist/assert.d.ts +4 -4
- package/dist/assert.js +2 -10
- package/dist/chunk-256KIVJL.js +96 -85
- package/dist/chunk-42XB3YCW.js +17 -19
- package/dist/chunk-6SM22VVJ.js +10 -13
- package/dist/chunk-CAKJT3KS.js +69 -84
- package/dist/chunk-E3OXBRYF.js +17 -19
- package/dist/chunk-EBPE35JT.js +26 -28
- package/dist/chunk-FIPU4MLT.js +16 -18
- package/dist/chunk-FJUDBLCP.js +43 -50
- package/dist/chunk-FKRDCWBF.js +17 -19
- package/dist/chunk-GZU3RBTB.js +40 -51
- package/dist/chunk-HGJ4TXY4.js +100 -132
- package/dist/chunk-HMRKN75I.js +63 -63
- package/dist/chunk-IKHPGFCW.js +9 -11
- package/dist/chunk-JAPMIE6S.js +5 -7
- package/dist/chunk-KRNOMBXQ.js +17 -19
- package/dist/chunk-LLR722CL.js +70 -91
- package/dist/chunk-RLT4RFKV.js +30 -39
- package/dist/chunk-SJPDVKUS.js +88 -107
- package/dist/chunk-SMQO5WD7.js +16 -26
- package/dist/chunk-STHEPPUZ.js +6 -8
- package/dist/chunk-UJJ7R56J.js +37 -47
- package/dist/chunk-UTDLUEEG.js +25 -0
- package/dist/chunk-VFTYH33W.js +37 -54
- package/dist/chunk-XXJKNKGQ.js +23 -33
- package/dist/chunk-ZV4BH47P.js +134 -132
- package/dist/cookie.cjs +175 -169
- package/dist/cookie.d.ts +51 -23
- package/dist/cookie.js +34 -34
- package/dist/error.cjs +75 -75
- package/dist/error.d.ts +30 -30
- package/dist/error.js +8 -15
- package/dist/headers.cjs +28 -28
- package/dist/headers.d.ts +2 -2
- package/dist/headers.js +2 -6
- package/dist/index-DpfbvTZ_.d.ts +298 -249
- package/dist/index.cjs +969 -933
- package/dist/index.d.ts +31 -10
- package/dist/index.js +50 -70
- package/dist/jose.cjs +67 -52
- package/dist/jose.d.ts +8 -8
- package/dist/jose.js +5 -9
- package/dist/oauth/bitbucket.cjs +38 -38
- package/dist/oauth/bitbucket.d.ts +7 -7
- package/dist/oauth/bitbucket.js +2 -6
- package/dist/oauth/discord.cjs +48 -48
- package/dist/oauth/discord.d.ts +7 -7
- package/dist/oauth/discord.js +2 -6
- package/dist/oauth/figma.cjs +39 -39
- package/dist/oauth/figma.d.ts +7 -7
- package/dist/oauth/figma.js +2 -6
- package/dist/oauth/github.cjs +31 -31
- package/dist/oauth/github.d.ts +7 -7
- package/dist/oauth/github.js +2 -6
- package/dist/oauth/gitlab.cjs +39 -39
- package/dist/oauth/gitlab.d.ts +7 -7
- package/dist/oauth/gitlab.js +2 -6
- package/dist/oauth/index.cjs +180 -180
- package/dist/oauth/index.d.ts +26 -7
- package/dist/oauth/index.js +9 -36
- package/dist/oauth/spotify.cjs +39 -39
- package/dist/oauth/spotify.d.ts +7 -7
- package/dist/oauth/spotify.js +2 -6
- package/dist/oauth/x.cjs +39 -39
- package/dist/oauth/x.d.ts +7 -7
- package/dist/oauth/x.js +2 -6
- package/dist/response.cjs +27 -27
- package/dist/response.d.ts +2 -2
- package/dist/response.js +2 -6
- package/dist/schemas.cjs +91 -91
- package/dist/schemas.d.ts +126 -93
- package/dist/schemas.js +18 -18
- package/dist/secure.cjs +98 -95
- package/dist/secure.d.ts +17 -17
- package/dist/secure.js +4 -18
- package/dist/utils.cjs +132 -119
- package/dist/utils.d.ts +26 -11
- package/dist/utils.js +21 -21
- package/package.json +1 -1
- package/dist/chunk-X7M4CQTN.js +0 -25
package/dist/oauth/index.cjs
CHANGED
|
@@ -1,213 +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
|
|
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
6
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
7
|
+
for (var name in all) __defProp(target, name, { get: all[name], enumerable: true })
|
|
8
|
+
}
|
|
10
9
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod)
|
|
10
|
+
if ((from && typeof from === "object") || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable })
|
|
14
|
+
}
|
|
15
|
+
return to
|
|
16
|
+
}
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod)
|
|
19
18
|
|
|
20
19
|
// src/oauth/index.ts
|
|
21
|
-
var oauth_exports = {}
|
|
20
|
+
var oauth_exports = {}
|
|
22
21
|
__export(oauth_exports, {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
})
|
|
33
|
-
module.exports = __toCommonJS(oauth_exports)
|
|
22
|
+
bitbucket: () => bitbucket,
|
|
23
|
+
builtInOAuthProviders: () => builtInOAuthProviders,
|
|
24
|
+
createBuiltInOAuthProviders: () => createBuiltInOAuthProviders,
|
|
25
|
+
discord: () => discord,
|
|
26
|
+
figma: () => figma,
|
|
27
|
+
github: () => github,
|
|
28
|
+
gitlab: () => gitlab,
|
|
29
|
+
spotify: () => spotify,
|
|
30
|
+
x: () => x,
|
|
31
|
+
})
|
|
32
|
+
module.exports = __toCommonJS(oauth_exports)
|
|
34
33
|
|
|
35
34
|
// src/oauth/github.ts
|
|
36
35
|
var github = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
36
|
+
id: "github",
|
|
37
|
+
name: "GitHub",
|
|
38
|
+
authorizeURL: "https://github.com/login/oauth/authorize",
|
|
39
|
+
accessToken: "https://github.com/login/oauth/access_token",
|
|
40
|
+
userInfo: "https://api.github.com/user",
|
|
41
|
+
scope: "read:user user:email",
|
|
42
|
+
responseType: "code",
|
|
43
|
+
}
|
|
45
44
|
|
|
46
45
|
// src/oauth/bitbucket.ts
|
|
47
46
|
var bitbucket = {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
47
|
+
id: "bitbucket",
|
|
48
|
+
name: "Bitbucket",
|
|
49
|
+
authorizeURL: "https://bitbucket.org/site/oauth2/authorize",
|
|
50
|
+
accessToken: "https://bitbucket.org/site/oauth2/access_token",
|
|
51
|
+
userInfo: "https://api.bitbucket.org/2.0/user",
|
|
52
|
+
scope: "account email",
|
|
53
|
+
responseType: "code",
|
|
54
|
+
profile(profile) {
|
|
55
|
+
return {
|
|
56
|
+
sub: profile.uuid ?? profile.account_id,
|
|
57
|
+
name: profile.display_name ?? profile.nickname,
|
|
58
|
+
image: profile.links.avatar.href,
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
}
|
|
63
62
|
|
|
64
63
|
// src/oauth/figma.ts
|
|
65
64
|
var figma = {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
65
|
+
id: "figma",
|
|
66
|
+
name: "Figma",
|
|
67
|
+
authorizeURL: "https://www.figma.com/oauth",
|
|
68
|
+
accessToken: "https://api.figma.com/v1/oauth/token",
|
|
69
|
+
userInfo: "https://api.figma.com/v1/me",
|
|
70
|
+
scope: "current_user:read",
|
|
71
|
+
responseType: "code",
|
|
72
|
+
profile(profile) {
|
|
73
|
+
return {
|
|
74
|
+
sub: profile.id,
|
|
75
|
+
name: profile.handle,
|
|
76
|
+
email: profile.email,
|
|
77
|
+
image: profile.img_url,
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
}
|
|
82
81
|
|
|
83
82
|
// src/oauth/discord.ts
|
|
84
83
|
var discord = {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
84
|
+
id: "discord",
|
|
85
|
+
name: "Discord",
|
|
86
|
+
authorizeURL: "https://discord.com/oauth2/authorize",
|
|
87
|
+
accessToken: "https://discord.com/api/oauth2/token",
|
|
88
|
+
userInfo: "https://discord.com/api/users/@me",
|
|
89
|
+
scope: "identify email",
|
|
90
|
+
responseType: "code",
|
|
91
|
+
profile(profile) {
|
|
92
|
+
let image = ""
|
|
93
|
+
if (profile.avatar === null) {
|
|
94
|
+
const index = profile.discriminator === "0" ? (BigInt(profile.id) >> 22n) % 6n : Number(profile.discriminator) % 5
|
|
95
|
+
image = `https://cdn.discordapp.com/embed/avatars/${index}.png`
|
|
96
|
+
} else {
|
|
97
|
+
const format = profile.avatar.startsWith("a_") ? "gif" : "png"
|
|
98
|
+
image = `https://cdn.discordapp.com/avatars/${profile.id}/${profile.avatar}.${format}`
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
sub: profile.id,
|
|
102
|
+
// https://discord.com/developers/docs/change-log#display-names
|
|
103
|
+
name: profile.global_name ?? profile.username,
|
|
104
|
+
email: profile.email ?? "",
|
|
105
|
+
image,
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
}
|
|
110
109
|
|
|
111
110
|
// src/oauth/gitlab.ts
|
|
112
111
|
var gitlab = {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
112
|
+
id: "gitlab",
|
|
113
|
+
name: "GitLab",
|
|
114
|
+
authorizeURL: "https://gitlab.com/oauth/authorize",
|
|
115
|
+
accessToken: "https://gitlab.com/oauth/token",
|
|
116
|
+
userInfo: "https://gitlab.com/api/v4/user",
|
|
117
|
+
scope: "read_user",
|
|
118
|
+
responseType: "code",
|
|
119
|
+
profile(profile) {
|
|
120
|
+
return {
|
|
121
|
+
sub: profile.id.toString(),
|
|
122
|
+
name: profile.name ?? profile.username,
|
|
123
|
+
email: profile.email,
|
|
124
|
+
avatar: profile.avatar_url,
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
}
|
|
129
128
|
|
|
130
129
|
// src/oauth/spotify.ts
|
|
131
130
|
var spotify = {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
131
|
+
id: "spotify",
|
|
132
|
+
name: "Spotify",
|
|
133
|
+
authorizeURL: "https://accounts.spotify.com/authorize",
|
|
134
|
+
accessToken: "https://accounts.spotify.com/api/token",
|
|
135
|
+
userInfo: "https://api.spotify.com/v1/me",
|
|
136
|
+
scope: "user-read-email user-read-private",
|
|
137
|
+
responseType: "token",
|
|
138
|
+
profile(profile) {
|
|
139
|
+
return {
|
|
140
|
+
sub: profile.id,
|
|
141
|
+
name: profile.display_name,
|
|
142
|
+
email: profile.email,
|
|
143
|
+
image: profile.images?.[0]?.url,
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
}
|
|
148
147
|
|
|
149
148
|
// src/oauth/x.ts
|
|
150
149
|
var x = {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
150
|
+
id: "x",
|
|
151
|
+
name: "X",
|
|
152
|
+
authorizeURL: "https://x.com/i/oauth2/authorize",
|
|
153
|
+
accessToken: "https://api.x.com/2/oauth2/token",
|
|
154
|
+
userInfo: "https://api.x.com/2/users/me?user.fields=profile_image_url",
|
|
155
|
+
scope: "users.read users.email tweet.read offline.access",
|
|
156
|
+
responseType: "code",
|
|
157
|
+
profile({ data }) {
|
|
158
|
+
return {
|
|
159
|
+
sub: data.id,
|
|
160
|
+
name: data.name,
|
|
161
|
+
image: data.profile_image_url,
|
|
162
|
+
email: "",
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
}
|
|
167
166
|
|
|
168
167
|
// src/oauth/index.ts
|
|
169
168
|
var builtInOAuthProviders = {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
169
|
+
github,
|
|
170
|
+
bitbucket,
|
|
171
|
+
figma,
|
|
172
|
+
discord,
|
|
173
|
+
gitlab,
|
|
174
|
+
spotify,
|
|
175
|
+
x,
|
|
176
|
+
}
|
|
178
177
|
var defineOAuthEnvironment = (oauth) => {
|
|
179
|
-
|
|
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];
|
|
178
|
+
const env = process.env
|
|
189
179
|
return {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
180
|
+
clientId: env[`AURA_AUTH_${oauth.toUpperCase()}_CLIENT_ID`],
|
|
181
|
+
clientSecret: env[`AURA_AUTH_${oauth.toUpperCase()}_CLIENT_SECRET`],
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
var defineOAuthProviderConfig = (config) => {
|
|
185
|
+
if (typeof config === "string") {
|
|
186
|
+
const definition = defineOAuthEnvironment(config)
|
|
187
|
+
const oauthConfig = builtInOAuthProviders[config]
|
|
188
|
+
return {
|
|
189
|
+
...oauthConfig,
|
|
190
|
+
...definition,
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return config
|
|
194
|
+
}
|
|
196
195
|
var createBuiltInOAuthProviders = (oauth = []) => {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
196
|
+
return oauth.reduce((previous, config) => {
|
|
197
|
+
const oauthConfig = defineOAuthProviderConfig(config)
|
|
198
|
+
return { ...previous, [oauthConfig.id]: oauthConfig }
|
|
199
|
+
}, {})
|
|
200
|
+
}
|
|
202
201
|
// Annotate the CommonJS export names for ESM import in node:
|
|
203
|
-
0 &&
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
202
|
+
0 &&
|
|
203
|
+
(module.exports = {
|
|
204
|
+
bitbucket,
|
|
205
|
+
builtInOAuthProviders,
|
|
206
|
+
createBuiltInOAuthProviders,
|
|
207
|
+
discord,
|
|
208
|
+
figma,
|
|
209
|
+
github,
|
|
210
|
+
gitlab,
|
|
211
|
+
spotify,
|
|
212
|
+
x,
|
|
213
|
+
})
|
package/dist/oauth/index.d.ts
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export {
|
|
2
|
+
B as BitbucketProfile,
|
|
3
|
+
p as BuiltInOAuthProvider,
|
|
4
|
+
D as DiscordProfile,
|
|
5
|
+
F as FigmaProfile,
|
|
6
|
+
l as GitHubProfile,
|
|
7
|
+
G as GitLabProfile,
|
|
8
|
+
N as Nameplate,
|
|
9
|
+
g as SpotifyProfile,
|
|
10
|
+
X as XProfile,
|
|
11
|
+
k as bitbucket,
|
|
12
|
+
n as builtInOAuthProviders,
|
|
13
|
+
o as createBuiltInOAuthProviders,
|
|
14
|
+
i as discord,
|
|
15
|
+
j as figma,
|
|
16
|
+
m as github,
|
|
17
|
+
h as gitlab,
|
|
18
|
+
s as spotify,
|
|
19
|
+
x,
|
|
20
|
+
} from "../index-DpfbvTZ_.js"
|
|
21
|
+
import "../@types/utility.js"
|
|
22
|
+
import "zod/v4"
|
|
23
|
+
import "@aura-stack/jose/jose"
|
|
24
|
+
import "../schemas.js"
|
|
25
|
+
import "zod/v4/core"
|
|
26
|
+
import "cookie"
|
package/dist/oauth/index.js
CHANGED
|
@@ -1,36 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import {
|
|
9
|
-
|
|
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
|
-
};
|
|
1
|
+
import { builtInOAuthProviders, createBuiltInOAuthProviders } from "../chunk-VFTYH33W.js"
|
|
2
|
+
import { figma } from "../chunk-FKRDCWBF.js"
|
|
3
|
+
import { github } from "../chunk-IKHPGFCW.js"
|
|
4
|
+
import { gitlab } from "../chunk-KRNOMBXQ.js"
|
|
5
|
+
import { spotify } from "../chunk-E3OXBRYF.js"
|
|
6
|
+
import { x } from "../chunk-42XB3YCW.js"
|
|
7
|
+
import { bitbucket } from "../chunk-FIPU4MLT.js"
|
|
8
|
+
import { discord } from "../chunk-EBPE35JT.js"
|
|
9
|
+
export { bitbucket, builtInOAuthProviders, createBuiltInOAuthProviders, discord, figma, github, gitlab, spotify, x }
|
package/dist/oauth/spotify.cjs
CHANGED
|
@@ -1,46 +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
|
|
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
6
|
var __export = (target, all) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
7
|
+
for (var name in all) __defProp(target, name, { get: all[name], enumerable: true })
|
|
8
|
+
}
|
|
10
9
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod)
|
|
10
|
+
if ((from && typeof from === "object") || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable })
|
|
14
|
+
}
|
|
15
|
+
return to
|
|
16
|
+
}
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod)
|
|
19
18
|
|
|
20
19
|
// src/oauth/spotify.ts
|
|
21
|
-
var spotify_exports = {}
|
|
20
|
+
var spotify_exports = {}
|
|
22
21
|
__export(spotify_exports, {
|
|
23
|
-
|
|
24
|
-
})
|
|
25
|
-
module.exports = __toCommonJS(spotify_exports)
|
|
22
|
+
spotify: () => spotify,
|
|
23
|
+
})
|
|
24
|
+
module.exports = __toCommonJS(spotify_exports)
|
|
26
25
|
var spotify = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
26
|
+
id: "spotify",
|
|
27
|
+
name: "Spotify",
|
|
28
|
+
authorizeURL: "https://accounts.spotify.com/authorize",
|
|
29
|
+
accessToken: "https://accounts.spotify.com/api/token",
|
|
30
|
+
userInfo: "https://api.spotify.com/v1/me",
|
|
31
|
+
scope: "user-read-email user-read-private",
|
|
32
|
+
responseType: "token",
|
|
33
|
+
profile(profile) {
|
|
34
|
+
return {
|
|
35
|
+
sub: profile.id,
|
|
36
|
+
name: profile.display_name,
|
|
37
|
+
email: profile.email,
|
|
38
|
+
image: profile.images?.[0]?.url,
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
}
|
|
43
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 &&
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
0 &&
|
|
44
|
+
(module.exports = {
|
|
45
|
+
spotify,
|
|
46
|
+
})
|
package/dist/oauth/spotify.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { g as SpotifyProfile, s as spotify } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
export { g as SpotifyProfile, s as spotify } from "../index-DpfbvTZ_.js"
|
|
2
|
+
import "zod/v4"
|
|
3
|
+
import "@aura-stack/jose/jose"
|
|
4
|
+
import "../schemas.js"
|
|
5
|
+
import "zod/v4/core"
|
|
6
|
+
import "cookie"
|
|
7
|
+
import "../@types/utility.js"
|
package/dist/oauth/spotify.js
CHANGED