@better-auth/core 1.5.7-beta.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.mts +12 -43
- package/dist/api/index.mjs +0 -3
- package/dist/async_hooks/index.d.mts +1 -2
- package/dist/async_hooks/index.mjs +0 -2
- package/dist/async_hooks/pure.index.d.mts +1 -2
- package/dist/async_hooks/pure.index.mjs +0 -2
- package/dist/context/endpoint-context.d.mts +2 -3
- package/dist/context/endpoint-context.mjs +0 -2
- package/dist/context/global.d.mts +1 -2
- package/dist/context/global.mjs +1 -3
- package/dist/context/request-state.d.mts +1 -2
- package/dist/context/request-state.mjs +0 -2
- package/dist/context/transaction.d.mts +1 -2
- package/dist/context/transaction.mjs +0 -2
- package/dist/db/adapter/factory.d.mts +1 -2
- package/dist/db/adapter/factory.mjs +3 -6
- package/dist/db/adapter/get-default-field-name.d.mts +1 -2
- package/dist/db/adapter/get-default-field-name.mjs +0 -2
- package/dist/db/adapter/get-default-model-name.d.mts +1 -2
- package/dist/db/adapter/get-default-model-name.mjs +0 -2
- package/dist/db/adapter/get-field-attributes.d.mts +1 -2
- package/dist/db/adapter/get-field-attributes.mjs +0 -2
- package/dist/db/adapter/get-field-name.d.mts +1 -2
- package/dist/db/adapter/get-field-name.mjs +0 -2
- package/dist/db/adapter/get-id-field.d.mts +1 -2
- package/dist/db/adapter/get-id-field.mjs +0 -3
- package/dist/db/adapter/get-model-name.d.mts +1 -2
- package/dist/db/adapter/get-model-name.mjs +0 -2
- package/dist/db/adapter/index.d.mts +9 -2
- package/dist/db/adapter/index.mjs +0 -2
- package/dist/db/adapter/types.d.mts +1 -2
- package/dist/db/adapter/utils.d.mts +1 -2
- package/dist/db/adapter/utils.mjs +0 -2
- package/dist/db/get-tables.d.mts +1 -2
- package/dist/db/get-tables.mjs +0 -2
- package/dist/db/plugin.d.mts +1 -2
- package/dist/db/schema/account.d.mts +1 -2
- package/dist/db/schema/account.mjs +0 -2
- package/dist/db/schema/rate-limit.d.mts +1 -2
- package/dist/db/schema/rate-limit.mjs +0 -2
- package/dist/db/schema/session.d.mts +1 -2
- package/dist/db/schema/session.mjs +0 -2
- package/dist/db/schema/shared.d.mts +1 -2
- package/dist/db/schema/shared.mjs +0 -2
- package/dist/db/schema/user.d.mts +1 -2
- package/dist/db/schema/user.mjs +0 -2
- package/dist/db/schema/verification.d.mts +1 -2
- package/dist/db/schema/verification.mjs +0 -2
- package/dist/db/type.d.mts +1 -2
- package/dist/env/color-depth.d.mts +1 -2
- package/dist/env/color-depth.mjs +0 -2
- package/dist/env/env-impl.d.mts +1 -2
- package/dist/env/env-impl.mjs +0 -2
- package/dist/env/logger.d.mts +1 -2
- package/dist/env/logger.mjs +0 -2
- package/dist/error/codes.d.mts +1 -2
- package/dist/error/codes.mjs +0 -2
- package/dist/error/index.d.mts +1 -2
- package/dist/error/index.mjs +0 -2
- package/dist/instrumentation/attributes.d.mts +1 -2
- package/dist/instrumentation/attributes.mjs +0 -2
- package/dist/instrumentation/tracer.d.mts +1 -2
- package/dist/instrumentation/tracer.mjs +29 -15
- package/dist/oauth2/client-credentials-token.d.mts +1 -2
- package/dist/oauth2/client-credentials-token.mjs +0 -2
- package/dist/oauth2/create-authorization-url.d.mts +1 -2
- package/dist/oauth2/create-authorization-url.mjs +0 -2
- package/dist/oauth2/oauth-provider.d.mts +1 -2
- package/dist/oauth2/refresh-access-token.d.mts +1 -2
- package/dist/oauth2/refresh-access-token.mjs +0 -2
- package/dist/oauth2/utils.d.mts +1 -2
- package/dist/oauth2/utils.mjs +0 -2
- package/dist/oauth2/validate-authorization-code.d.mts +1 -2
- package/dist/oauth2/validate-authorization-code.mjs +0 -3
- package/dist/oauth2/verify.d.mts +1 -2
- package/dist/oauth2/verify.mjs +0 -3
- package/dist/social-providers/apple.d.mts +1 -2
- package/dist/social-providers/apple.mjs +0 -3
- package/dist/social-providers/atlassian.d.mts +1 -2
- package/dist/social-providers/atlassian.mjs +0 -4
- package/dist/social-providers/cognito.d.mts +1 -2
- package/dist/social-providers/cognito.mjs +0 -4
- package/dist/social-providers/discord.d.mts +1 -2
- package/dist/social-providers/discord.mjs +0 -3
- package/dist/social-providers/dropbox.d.mts +1 -2
- package/dist/social-providers/dropbox.mjs +0 -3
- package/dist/social-providers/facebook.d.mts +1 -2
- package/dist/social-providers/facebook.mjs +0 -3
- package/dist/social-providers/figma.d.mts +1 -2
- package/dist/social-providers/figma.mjs +0 -4
- package/dist/social-providers/github.d.mts +1 -2
- package/dist/social-providers/github.mjs +0 -4
- package/dist/social-providers/gitlab.d.mts +1 -2
- package/dist/social-providers/gitlab.mjs +0 -3
- package/dist/social-providers/google.d.mts +1 -2
- package/dist/social-providers/google.mjs +0 -4
- package/dist/social-providers/huggingface.d.mts +1 -2
- package/dist/social-providers/huggingface.mjs +0 -3
- package/dist/social-providers/index.d.mts +1 -2
- package/dist/social-providers/index.mjs +0 -2
- package/dist/social-providers/kakao.d.mts +1 -2
- package/dist/social-providers/kakao.mjs +0 -3
- package/dist/social-providers/kick.d.mts +1 -2
- package/dist/social-providers/kick.mjs +0 -3
- package/dist/social-providers/line.d.mts +1 -2
- package/dist/social-providers/line.mjs +0 -3
- package/dist/social-providers/linear.d.mts +1 -2
- package/dist/social-providers/linear.mjs +0 -3
- package/dist/social-providers/linkedin.d.mts +1 -2
- package/dist/social-providers/linkedin.mjs +0 -3
- package/dist/social-providers/microsoft-entra-id.d.mts +1 -2
- package/dist/social-providers/microsoft-entra-id.mjs +0 -4
- package/dist/social-providers/naver.d.mts +1 -2
- package/dist/social-providers/naver.mjs +0 -3
- package/dist/social-providers/notion.d.mts +1 -2
- package/dist/social-providers/notion.mjs +0 -3
- package/dist/social-providers/paybin.d.mts +1 -2
- package/dist/social-providers/paybin.mjs +0 -4
- package/dist/social-providers/paypal.d.mts +1 -2
- package/dist/social-providers/paypal.mjs +0 -4
- package/dist/social-providers/polar.d.mts +1 -2
- package/dist/social-providers/polar.mjs +0 -3
- package/dist/social-providers/railway.d.mts +1 -2
- package/dist/social-providers/railway.mjs +0 -3
- package/dist/social-providers/reddit.d.mts +1 -2
- package/dist/social-providers/reddit.mjs +0 -3
- package/dist/social-providers/roblox.d.mts +1 -2
- package/dist/social-providers/roblox.mjs +0 -3
- package/dist/social-providers/salesforce.d.mts +1 -2
- package/dist/social-providers/salesforce.mjs +0 -4
- package/dist/social-providers/slack.d.mts +1 -2
- package/dist/social-providers/slack.mjs +0 -3
- package/dist/social-providers/spotify.d.mts +1 -2
- package/dist/social-providers/spotify.mjs +0 -3
- package/dist/social-providers/tiktok.d.mts +1 -2
- package/dist/social-providers/tiktok.mjs +0 -3
- package/dist/social-providers/twitch.d.mts +1 -2
- package/dist/social-providers/twitch.mjs +0 -4
- package/dist/social-providers/twitter.d.mts +1 -2
- package/dist/social-providers/twitter.mjs +0 -3
- package/dist/social-providers/vercel.d.mts +1 -2
- package/dist/social-providers/vercel.mjs +0 -3
- package/dist/social-providers/vk.d.mts +1 -2
- package/dist/social-providers/vk.mjs +0 -3
- package/dist/social-providers/wechat.d.mts +1 -2
- package/dist/social-providers/wechat.mjs +0 -2
- package/dist/social-providers/zoom.d.mts +1 -2
- package/dist/social-providers/zoom.mjs +0 -3
- package/dist/types/context.d.mts +5 -3
- package/dist/types/cookie.d.mts +1 -2
- package/dist/types/helper.d.mts +1 -2
- package/dist/types/init-options.d.mts +14 -6
- package/dist/types/plugin-client.d.mts +2 -2
- package/dist/types/plugin.d.mts +3 -6
- package/dist/types/secret.d.mts +1 -2
- package/dist/utils/db.d.mts +1 -2
- package/dist/utils/db.mjs +0 -2
- package/dist/utils/deprecate.d.mts +1 -2
- package/dist/utils/deprecate.mjs +0 -2
- package/dist/utils/error-codes.d.mts +1 -2
- package/dist/utils/error-codes.mjs +0 -2
- package/dist/utils/fetch-metadata.d.mts +1 -2
- package/dist/utils/fetch-metadata.mjs +0 -2
- package/dist/utils/id.d.mts +1 -2
- package/dist/utils/id.mjs +0 -2
- package/dist/utils/ip.d.mts +1 -2
- package/dist/utils/ip.mjs +0 -2
- package/dist/utils/json.d.mts +1 -2
- package/dist/utils/json.mjs +0 -3
- package/dist/utils/string.d.mts +1 -2
- package/dist/utils/string.mjs +0 -2
- package/dist/utils/url.d.mts +1 -2
- package/dist/utils/url.mjs +0 -2
- package/package.json +9 -7
- package/src/api/index.ts +41 -151
- package/src/context/endpoint-context.ts +1 -2
- package/src/db/adapter/factory.ts +2 -0
- package/src/db/adapter/index.ts +8 -0
- package/src/instrumentation/tracer.ts +40 -12
- package/src/social-providers/index.ts +0 -2
- package/src/types/context.ts +4 -1
- package/src/types/init-options.ts +13 -4
- package/src/types/plugin-client.ts +1 -0
- package/src/types/plugin.ts +2 -14
- package/dist/api/index.mjs.map +0 -1
- package/dist/async_hooks/index.mjs.map +0 -1
- package/dist/async_hooks/pure.index.mjs.map +0 -1
- package/dist/context/endpoint-context.mjs.map +0 -1
- package/dist/context/global.mjs.map +0 -1
- package/dist/context/request-state.mjs.map +0 -1
- package/dist/context/transaction.mjs.map +0 -1
- package/dist/db/adapter/factory.mjs.map +0 -1
- package/dist/db/adapter/get-default-field-name.mjs.map +0 -1
- package/dist/db/adapter/get-default-model-name.mjs.map +0 -1
- package/dist/db/adapter/get-field-attributes.mjs.map +0 -1
- package/dist/db/adapter/get-field-name.mjs.map +0 -1
- package/dist/db/adapter/get-id-field.mjs.map +0 -1
- package/dist/db/adapter/get-model-name.mjs.map +0 -1
- package/dist/db/adapter/index.mjs.map +0 -1
- package/dist/db/adapter/utils.mjs.map +0 -1
- package/dist/db/get-tables.mjs.map +0 -1
- package/dist/db/schema/account.mjs.map +0 -1
- package/dist/db/schema/rate-limit.mjs.map +0 -1
- package/dist/db/schema/session.mjs.map +0 -1
- package/dist/db/schema/shared.mjs.map +0 -1
- package/dist/db/schema/user.mjs.map +0 -1
- package/dist/db/schema/verification.mjs.map +0 -1
- package/dist/env/color-depth.mjs.map +0 -1
- package/dist/env/env-impl.mjs.map +0 -1
- package/dist/env/logger.mjs.map +0 -1
- package/dist/error/codes.mjs.map +0 -1
- package/dist/error/index.mjs.map +0 -1
- package/dist/instrumentation/attributes.mjs.map +0 -1
- package/dist/instrumentation/tracer.mjs.map +0 -1
- package/dist/oauth2/client-credentials-token.mjs.map +0 -1
- package/dist/oauth2/create-authorization-url.mjs.map +0 -1
- package/dist/oauth2/refresh-access-token.mjs.map +0 -1
- package/dist/oauth2/utils.mjs.map +0 -1
- package/dist/oauth2/validate-authorization-code.mjs.map +0 -1
- package/dist/oauth2/verify.mjs.map +0 -1
- package/dist/social-providers/apple.mjs.map +0 -1
- package/dist/social-providers/atlassian.mjs.map +0 -1
- package/dist/social-providers/cognito.mjs.map +0 -1
- package/dist/social-providers/discord.mjs.map +0 -1
- package/dist/social-providers/dropbox.mjs.map +0 -1
- package/dist/social-providers/facebook.mjs.map +0 -1
- package/dist/social-providers/figma.mjs.map +0 -1
- package/dist/social-providers/github.mjs.map +0 -1
- package/dist/social-providers/gitlab.mjs.map +0 -1
- package/dist/social-providers/google.mjs.map +0 -1
- package/dist/social-providers/huggingface.mjs.map +0 -1
- package/dist/social-providers/index.mjs.map +0 -1
- package/dist/social-providers/kakao.mjs.map +0 -1
- package/dist/social-providers/kick.mjs.map +0 -1
- package/dist/social-providers/line.mjs.map +0 -1
- package/dist/social-providers/linear.mjs.map +0 -1
- package/dist/social-providers/linkedin.mjs.map +0 -1
- package/dist/social-providers/microsoft-entra-id.mjs.map +0 -1
- package/dist/social-providers/naver.mjs.map +0 -1
- package/dist/social-providers/notion.mjs.map +0 -1
- package/dist/social-providers/paybin.mjs.map +0 -1
- package/dist/social-providers/paypal.mjs.map +0 -1
- package/dist/social-providers/polar.mjs.map +0 -1
- package/dist/social-providers/railway.mjs.map +0 -1
- package/dist/social-providers/reddit.mjs.map +0 -1
- package/dist/social-providers/roblox.mjs.map +0 -1
- package/dist/social-providers/salesforce.mjs.map +0 -1
- package/dist/social-providers/slack.mjs.map +0 -1
- package/dist/social-providers/spotify.mjs.map +0 -1
- package/dist/social-providers/tiktok.mjs.map +0 -1
- package/dist/social-providers/twitch.mjs.map +0 -1
- package/dist/social-providers/twitter.mjs.map +0 -1
- package/dist/social-providers/vercel.mjs.map +0 -1
- package/dist/social-providers/vk.mjs.map +0 -1
- package/dist/social-providers/wechat.mjs.map +0 -1
- package/dist/social-providers/zoom.mjs.map +0 -1
- package/dist/utils/db.mjs.map +0 -1
- package/dist/utils/deprecate.mjs.map +0 -1
- package/dist/utils/error-codes.mjs.map +0 -1
- package/dist/utils/fetch-metadata.mjs.map +0 -1
- package/dist/utils/id.mjs.map +0 -1
- package/dist/utils/ip.mjs.map +0 -1
- package/dist/utils/json.mjs.map +0 -1
- package/dist/utils/string.mjs.map +0 -1
- package/dist/utils/url.mjs.map +0 -1
- package/src/context/request-state.test.ts +0 -94
- package/src/db/adapter/get-id-field.test.ts +0 -222
- package/src/db/test/get-tables.test.ts +0 -116
- package/src/env/logger.test.ts +0 -34
- package/src/instrumentation/instrumentation.test.ts +0 -139
- package/src/oauth2/refresh-access-token.test.ts +0 -90
- package/src/oauth2/validate-token.test.ts +0 -229
- package/src/utils/deprecate.test.ts +0 -71
- package/src/utils/fetch-metadata.test.ts +0 -28
- package/src/utils/ip.test.ts +0 -255
|
@@ -8,5 +8,3 @@ const ATTR_HOOK_TYPE = "better_auth.hook.type";
|
|
|
8
8
|
const ATTR_CONTEXT = "better_auth.context";
|
|
9
9
|
//#endregion
|
|
10
10
|
export { ATTR_CONTEXT, ATTR_DB_COLLECTION_NAME, ATTR_DB_OPERATION_NAME, ATTR_HOOK_TYPE, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_HTTP_ROUTE, ATTR_OPERATION_ID };
|
|
11
|
-
|
|
12
|
-
//# sourceMappingURL=attributes.mjs.map
|
|
@@ -10,5 +10,4 @@
|
|
|
10
10
|
declare function withSpan<T>(name: string, attributes: Record<string, string | number | boolean>, fn: () => T): T;
|
|
11
11
|
declare function withSpan<T>(name: string, attributes: Record<string, string | number | boolean>, fn: () => Promise<T>): Promise<T>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { withSpan };
|
|
14
|
-
//# sourceMappingURL=tracer.d.mts.map
|
|
13
|
+
export { withSpan };
|
|
@@ -1,6 +1,32 @@
|
|
|
1
|
+
import { ATTR_HTTP_RESPONSE_STATUS_CODE } from "./attributes.mjs";
|
|
1
2
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
2
3
|
//#region src/instrumentation/tracer.ts
|
|
3
|
-
const tracer = trace.getTracer("better-auth", "1.
|
|
4
|
+
const tracer = trace.getTracer("better-auth", "1.6.0");
|
|
5
|
+
/**
|
|
6
|
+
* Better-auth uses `throw ctx.redirect(url)` for flow control (e.g. OAuth
|
|
7
|
+
* callbacks). These are APIErrors with 3xx status codes and should not be
|
|
8
|
+
* recorded as span errors.
|
|
9
|
+
*/
|
|
10
|
+
function isRedirectError(err) {
|
|
11
|
+
if (err != null && typeof err === "object" && "name" in err && err.name === "APIError" && "statusCode" in err) {
|
|
12
|
+
const status = err.statusCode;
|
|
13
|
+
return status >= 300 && status < 400;
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
function endSpanWithError(span, err) {
|
|
18
|
+
if (isRedirectError(err)) {
|
|
19
|
+
span.setAttribute(ATTR_HTTP_RESPONSE_STATUS_CODE, err.statusCode);
|
|
20
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
21
|
+
} else {
|
|
22
|
+
span.recordException(err);
|
|
23
|
+
span.setStatus({
|
|
24
|
+
code: SpanStatusCode.ERROR,
|
|
25
|
+
message: String(err?.message ?? err)
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
span.end();
|
|
29
|
+
}
|
|
4
30
|
function withSpan(name, attributes, fn) {
|
|
5
31
|
return tracer.startActiveSpan(name, { attributes }, (span) => {
|
|
6
32
|
try {
|
|
@@ -9,28 +35,16 @@ function withSpan(name, attributes, fn) {
|
|
|
9
35
|
span.end();
|
|
10
36
|
return value;
|
|
11
37
|
}).catch((err) => {
|
|
12
|
-
span
|
|
13
|
-
span.setStatus({
|
|
14
|
-
code: SpanStatusCode.ERROR,
|
|
15
|
-
message: String(err.message ?? err)
|
|
16
|
-
});
|
|
17
|
-
span.end();
|
|
38
|
+
endSpanWithError(span, err);
|
|
18
39
|
throw err;
|
|
19
40
|
});
|
|
20
41
|
span.end();
|
|
21
42
|
return result;
|
|
22
43
|
} catch (err) {
|
|
23
|
-
span
|
|
24
|
-
span.setStatus({
|
|
25
|
-
code: SpanStatusCode.ERROR,
|
|
26
|
-
message: String(err?.message ?? err)
|
|
27
|
-
});
|
|
28
|
-
span.end();
|
|
44
|
+
endSpanWithError(span, err);
|
|
29
45
|
throw err;
|
|
30
46
|
}
|
|
31
47
|
});
|
|
32
48
|
}
|
|
33
49
|
//#endregion
|
|
34
50
|
export { withSpan };
|
|
35
|
-
|
|
36
|
-
//# sourceMappingURL=tracer.mjs.map
|
|
@@ -53,5 +53,4 @@ declare function clientCredentialsToken({
|
|
|
53
53
|
resource?: (string | string[]) | undefined;
|
|
54
54
|
}): Promise<OAuth2Tokens>;
|
|
55
55
|
//#endregion
|
|
56
|
-
export { clientCredentialsToken, clientCredentialsTokenRequest, createClientCredentialsTokenRequest };
|
|
57
|
-
//# sourceMappingURL=client-credentials-token.d.mts.map
|
|
56
|
+
export { clientCredentialsToken, clientCredentialsTokenRequest, createClientCredentialsTokenRequest };
|
|
@@ -189,5 +189,4 @@ type ProviderOptions<Profile extends Record<string, any> = any> = {
|
|
|
189
189
|
overrideUserInfoOnSignIn?: boolean | undefined;
|
|
190
190
|
};
|
|
191
191
|
//#endregion
|
|
192
|
-
export { OAuth2Tokens, OAuth2UserInfo, OAuthProvider, ProviderOptions };
|
|
193
|
-
//# sourceMappingURL=oauth-provider.d.mts.map
|
|
192
|
+
export { OAuth2Tokens, OAuth2UserInfo, OAuthProvider, ProviderOptions };
|
|
@@ -51,5 +51,4 @@ declare function refreshAccessToken({
|
|
|
51
51
|
extraParams?: Record<string, string> | undefined;
|
|
52
52
|
}): Promise<OAuth2Tokens>;
|
|
53
53
|
//#endregion
|
|
54
|
-
export { createRefreshAccessTokenRequest, refreshAccessToken, refreshAccessTokenRequest };
|
|
55
|
-
//# sourceMappingURL=refresh-access-token.d.mts.map
|
|
54
|
+
export { createRefreshAccessTokenRequest, refreshAccessToken, refreshAccessTokenRequest };
|
package/dist/oauth2/utils.d.mts
CHANGED
|
@@ -4,5 +4,4 @@ import { OAuth2Tokens } from "./oauth-provider.mjs";
|
|
|
4
4
|
declare function getOAuth2Tokens(data: Record<string, any>): OAuth2Tokens;
|
|
5
5
|
declare function generateCodeChallenge(codeVerifier: string): Promise<string>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { generateCodeChallenge, getOAuth2Tokens };
|
|
8
|
-
//# sourceMappingURL=utils.d.mts.map
|
|
7
|
+
export { generateCodeChallenge, getOAuth2Tokens };
|
package/dist/oauth2/utils.mjs
CHANGED
|
@@ -82,5 +82,4 @@ declare function validateToken(token: string, jwksEndpoint: string, options?: {
|
|
|
82
82
|
issuer?: string | string[];
|
|
83
83
|
}): Promise<jose.JWTVerifyResult<jose.JWTPayload> & jose.ResolvedKey>;
|
|
84
84
|
//#endregion
|
|
85
|
-
export { authorizationCodeRequest, createAuthorizationCodeRequest, validateAuthorizationCode, validateToken };
|
|
86
|
-
//# sourceMappingURL=validate-authorization-code.d.mts.map
|
|
85
|
+
export { authorizationCodeRequest, createAuthorizationCodeRequest, validateAuthorizationCode, validateToken };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getOAuth2Tokens } from "./utils.mjs";
|
|
2
|
-
import "./index.mjs";
|
|
3
2
|
import { base64 } from "@better-auth/utils/base64";
|
|
4
3
|
import { betterFetch } from "@better-fetch/fetch";
|
|
5
4
|
import { createRemoteJWKSet, jwtVerify } from "jose";
|
|
@@ -78,5 +77,3 @@ async function validateToken(token, jwksEndpoint, options) {
|
|
|
78
77
|
}
|
|
79
78
|
//#endregion
|
|
80
79
|
export { authorizationCodeRequest, createAuthorizationCodeRequest, validateAuthorizationCode, validateToken };
|
|
81
|
-
|
|
82
|
-
//# sourceMappingURL=validate-authorization-code.mjs.map
|
package/dist/oauth2/verify.d.mts
CHANGED
|
@@ -39,5 +39,4 @@ declare function verifyAccessToken(token: string, opts: {
|
|
|
39
39
|
remoteVerify?: VerifyAccessTokenRemote;
|
|
40
40
|
}): Promise<JWTPayload>;
|
|
41
41
|
//#endregion
|
|
42
|
-
export { getJwks, verifyAccessToken, verifyJwsAccessToken };
|
|
43
|
-
//# sourceMappingURL=verify.d.mts.map
|
|
42
|
+
export { getJwks, verifyAccessToken, verifyJwsAccessToken };
|
package/dist/oauth2/verify.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { logger } from "../env/logger.mjs";
|
|
2
|
-
import "../env/index.mjs";
|
|
3
2
|
import { APIError } from "better-call";
|
|
4
3
|
import { betterFetch } from "@better-fetch/fetch";
|
|
5
4
|
import { UnsecuredJWT, createLocalJWKSet, decodeProtectedHeader, jwtVerify } from "jose";
|
|
@@ -91,5 +90,3 @@ async function verifyAccessToken(token, opts) {
|
|
|
91
90
|
}
|
|
92
91
|
//#endregion
|
|
93
92
|
export { getJwks, verifyAccessToken, verifyJwsAccessToken };
|
|
94
|
-
|
|
95
|
-
//# sourceMappingURL=verify.mjs.map
|
|
@@ -114,5 +114,4 @@ declare const apple: (options: AppleOptions) => {
|
|
|
114
114
|
};
|
|
115
115
|
declare const getApplePublicKey: (kid: string) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
|
|
116
116
|
//#endregion
|
|
117
|
-
export { AppleNonConformUser, AppleOptions, AppleProfile, apple, getApplePublicKey };
|
|
118
|
-
//# sourceMappingURL=apple.d.mts.map
|
|
117
|
+
export { AppleNonConformUser, AppleOptions, AppleProfile, apple, getApplePublicKey };
|
|
@@ -2,7 +2,6 @@ import { APIError } from "../error/index.mjs";
|
|
|
2
2
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
3
3
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
4
4
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
5
|
-
import "../oauth2/index.mjs";
|
|
6
5
|
import { betterFetch } from "@better-fetch/fetch";
|
|
7
6
|
import { decodeJwt, decodeProtectedHeader, importJWK, jwtVerify } from "jose";
|
|
8
7
|
//#region src/social-providers/apple.ts
|
|
@@ -100,5 +99,3 @@ const getApplePublicKey = async (kid) => {
|
|
|
100
99
|
};
|
|
101
100
|
//#endregion
|
|
102
101
|
export { apple, getApplePublicKey };
|
|
103
|
-
|
|
104
|
-
//# sourceMappingURL=apple.mjs.map
|
|
@@ -67,5 +67,4 @@ declare const atlassian: (options: AtlassianOptions) => {
|
|
|
67
67
|
options: AtlassianOptions;
|
|
68
68
|
};
|
|
69
69
|
//#endregion
|
|
70
|
-
export { AtlassianOptions, AtlassianProfile, atlassian };
|
|
71
|
-
//# sourceMappingURL=atlassian.d.mts.map
|
|
70
|
+
export { AtlassianOptions, AtlassianProfile, atlassian };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { logger } from "../env/logger.mjs";
|
|
2
|
-
import "../env/index.mjs";
|
|
3
2
|
import { BetterAuthError } from "../error/index.mjs";
|
|
4
3
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
5
4
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
6
5
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
7
|
-
import "../oauth2/index.mjs";
|
|
8
6
|
import { betterFetch } from "@better-fetch/fetch";
|
|
9
7
|
//#region src/social-providers/atlassian.ts
|
|
10
8
|
const atlassian = (options) => {
|
|
@@ -80,5 +78,3 @@ const atlassian = (options) => {
|
|
|
80
78
|
};
|
|
81
79
|
//#endregion
|
|
82
80
|
export { atlassian };
|
|
83
|
-
|
|
84
|
-
//# sourceMappingURL=atlassian.mjs.map
|
|
@@ -82,5 +82,4 @@ declare const cognito: (options: CognitoOptions) => {
|
|
|
82
82
|
};
|
|
83
83
|
declare const getCognitoPublicKey: (kid: string, region: string, userPoolId: string) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
|
|
84
84
|
//#endregion
|
|
85
|
-
export { CognitoOptions, CognitoProfile, cognito, getCognitoPublicKey };
|
|
86
|
-
//# sourceMappingURL=cognito.d.mts.map
|
|
85
|
+
export { CognitoOptions, CognitoProfile, cognito, getCognitoPublicKey };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { logger } from "../env/logger.mjs";
|
|
2
|
-
import "../env/index.mjs";
|
|
3
2
|
import { APIError, BetterAuthError } from "../error/index.mjs";
|
|
4
3
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
5
4
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
6
5
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
7
|
-
import "../oauth2/index.mjs";
|
|
8
6
|
import { betterFetch } from "@better-fetch/fetch";
|
|
9
7
|
import { decodeJwt, decodeProtectedHeader, importJWK, jwtVerify } from "jose";
|
|
10
8
|
//#region src/social-providers/cognito.ts
|
|
@@ -161,5 +159,3 @@ const getCognitoPublicKey = async (kid, region, userPoolId) => {
|
|
|
161
159
|
};
|
|
162
160
|
//#endregion
|
|
163
161
|
export { cognito, getCognitoPublicKey };
|
|
164
|
-
|
|
165
|
-
//# sourceMappingURL=cognito.mjs.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
2
2
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
3
|
-
import "../oauth2/index.mjs";
|
|
4
3
|
import { betterFetch } from "@better-fetch/fetch";
|
|
5
4
|
//#region src/social-providers/discord.ts
|
|
6
5
|
const discord = (options) => {
|
|
@@ -61,5 +60,3 @@ const discord = (options) => {
|
|
|
61
60
|
};
|
|
62
61
|
//#endregion
|
|
63
62
|
export { discord };
|
|
64
|
-
|
|
65
|
-
//# sourceMappingURL=discord.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
2
2
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
3
3
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
6
5
|
//#region src/social-providers/dropbox.ts
|
|
7
6
|
const dropbox = (options) => {
|
|
@@ -71,5 +70,3 @@ const dropbox = (options) => {
|
|
|
71
70
|
};
|
|
72
71
|
//#endregion
|
|
73
72
|
export { dropbox };
|
|
74
|
-
|
|
75
|
-
//# sourceMappingURL=dropbox.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
2
2
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
3
3
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
6
5
|
import { createRemoteJWKSet, decodeJwt, jwtVerify } from "jose";
|
|
7
6
|
//#region src/social-providers/facebook.ts
|
|
@@ -116,5 +115,3 @@ const facebook = (options) => {
|
|
|
116
115
|
};
|
|
117
116
|
//#endregion
|
|
118
117
|
export { facebook };
|
|
119
|
-
|
|
120
|
-
//# sourceMappingURL=facebook.mjs.map
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { logger } from "../env/logger.mjs";
|
|
2
|
-
import "../env/index.mjs";
|
|
3
2
|
import { BetterAuthError } from "../error/index.mjs";
|
|
4
3
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
5
4
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
6
5
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
7
|
-
import "../oauth2/index.mjs";
|
|
8
6
|
import { betterFetch } from "@better-fetch/fetch";
|
|
9
7
|
//#region src/social-providers/figma.ts
|
|
10
8
|
const figma = (options) => {
|
|
@@ -83,5 +81,3 @@ const figma = (options) => {
|
|
|
83
81
|
};
|
|
84
82
|
//#endregion
|
|
85
83
|
export { figma };
|
|
86
|
-
|
|
87
|
-
//# sourceMappingURL=figma.mjs.map
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { logger } from "../env/logger.mjs";
|
|
2
|
-
import "../env/index.mjs";
|
|
3
2
|
import { getOAuth2Tokens } from "../oauth2/utils.mjs";
|
|
4
3
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
5
4
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
6
5
|
import { createAuthorizationCodeRequest } from "../oauth2/validate-authorization-code.mjs";
|
|
7
|
-
import "../oauth2/index.mjs";
|
|
8
6
|
import { betterFetch } from "@better-fetch/fetch";
|
|
9
7
|
//#region src/social-providers/github.ts
|
|
10
8
|
const github = (options) => {
|
|
@@ -92,5 +90,3 @@ const github = (options) => {
|
|
|
92
90
|
};
|
|
93
91
|
//#endregion
|
|
94
92
|
export { github };
|
|
95
|
-
|
|
96
|
-
//# sourceMappingURL=github.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
2
2
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
3
3
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
6
5
|
//#region src/social-providers/gitlab.ts
|
|
7
6
|
const cleanDoubleSlashes = (input = "") => {
|
|
@@ -78,5 +77,3 @@ const gitlab = (options) => {
|
|
|
78
77
|
};
|
|
79
78
|
//#endregion
|
|
80
79
|
export { gitlab };
|
|
81
|
-
|
|
82
|
-
//# sourceMappingURL=gitlab.mjs.map
|
|
@@ -94,5 +94,4 @@ declare const google: (options: GoogleOptions) => {
|
|
|
94
94
|
};
|
|
95
95
|
declare const getGooglePublicKey: (kid: string) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
|
|
96
96
|
//#endregion
|
|
97
|
-
export { GoogleOptions, GoogleProfile, getGooglePublicKey, google };
|
|
98
|
-
//# sourceMappingURL=google.d.mts.map
|
|
97
|
+
export { GoogleOptions, GoogleProfile, getGooglePublicKey, google };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { logger } from "../env/logger.mjs";
|
|
2
|
-
import "../env/index.mjs";
|
|
3
2
|
import { APIError, BetterAuthError } from "../error/index.mjs";
|
|
4
3
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
5
4
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
6
5
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
7
|
-
import "../oauth2/index.mjs";
|
|
8
6
|
import { betterFetch } from "@better-fetch/fetch";
|
|
9
7
|
import { decodeJwt, decodeProtectedHeader, importJWK, jwtVerify } from "jose";
|
|
10
8
|
//#region src/social-providers/google.ts
|
|
@@ -108,5 +106,3 @@ const getGooglePublicKey = async (kid) => {
|
|
|
108
106
|
};
|
|
109
107
|
//#endregion
|
|
110
108
|
export { getGooglePublicKey, google };
|
|
111
|
-
|
|
112
|
-
//# sourceMappingURL=google.mjs.map
|
|
@@ -80,5 +80,4 @@ declare const huggingface: (options: HuggingFaceOptions) => {
|
|
|
80
80
|
options: HuggingFaceOptions;
|
|
81
81
|
};
|
|
82
82
|
//#endregion
|
|
83
|
-
export { HuggingFaceOptions, HuggingFaceProfile, huggingface };
|
|
84
|
-
//# sourceMappingURL=huggingface.d.mts.map
|
|
83
|
+
export { HuggingFaceOptions, HuggingFaceProfile, huggingface };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
2
2
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
3
3
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
6
5
|
//#region src/social-providers/huggingface.ts
|
|
7
6
|
const huggingface = (options) => {
|
|
@@ -72,5 +71,3 @@ const huggingface = (options) => {
|
|
|
72
71
|
};
|
|
73
72
|
//#endregion
|
|
74
73
|
export { huggingface };
|
|
75
|
-
|
|
76
|
-
//# sourceMappingURL=huggingface.mjs.map
|
|
@@ -1831,5 +1831,4 @@ type SocialProviders = { [K in SocialProviderList[number]]?: AwaitableFunction<P
|
|
|
1831
1831
|
}> };
|
|
1832
1832
|
type SocialProviderList = typeof socialProviderList;
|
|
1833
1833
|
//#endregion
|
|
1834
|
-
export { AccountStatus, AppleNonConformUser, AppleOptions, AppleProfile, AtlassianOptions, AtlassianProfile, CognitoOptions, CognitoProfile, DiscordOptions, DiscordProfile, DropboxOptions, DropboxProfile, FacebookOptions, FacebookProfile, FigmaOptions, FigmaProfile, GithubOptions, GithubProfile, GitlabOptions, GitlabProfile, GoogleOptions, GoogleProfile, HuggingFaceOptions, HuggingFaceProfile, KakaoOptions, KakaoProfile, KickOptions, KickProfile, LineIdTokenPayload, LineOptions, LineUserInfo, LinearOptions, LinearProfile, LinearUser, LinkedInOptions, LinkedInProfile, LoginType, MicrosoftEntraIDProfile, MicrosoftOptions, NaverOptions, NaverProfile, NotionOptions, NotionProfile, PayPalOptions, PayPalProfile, PayPalTokenResponse, PaybinOptions, PaybinProfile, PhoneNumber, PolarOptions, PolarProfile, PronounOption, RailwayOptions, RailwayProfile, RedditOptions, RedditProfile, RobloxOptions, RobloxProfile, SalesforceOptions, SalesforceProfile, SlackOptions, SlackProfile, SocialProvider, SocialProviderList, SocialProviderListEnum, SocialProviders, SpotifyOptions, SpotifyProfile, TiktokOptions, TiktokProfile, TwitchOptions, TwitchProfile, TwitterOption, TwitterProfile, VercelOptions, VercelProfile, VkOption, VkProfile, WeChatOptions, WeChatProfile, ZoomOptions, ZoomProfile, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, getGooglePublicKey, getMicrosoftPublicKey, github, gitlab, google, huggingface, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paybin, paypal, polar, railway, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vercel, vk, wechat, zoom };
|
|
1835
|
-
//# sourceMappingURL=index.d.mts.map
|
|
1834
|
+
export { AccountStatus, AppleNonConformUser, AppleOptions, AppleProfile, AtlassianOptions, AtlassianProfile, CognitoOptions, CognitoProfile, DiscordOptions, DiscordProfile, DropboxOptions, DropboxProfile, FacebookOptions, FacebookProfile, FigmaOptions, FigmaProfile, GithubOptions, GithubProfile, GitlabOptions, GitlabProfile, GoogleOptions, GoogleProfile, HuggingFaceOptions, HuggingFaceProfile, KakaoOptions, KakaoProfile, KickOptions, KickProfile, LineIdTokenPayload, LineOptions, LineUserInfo, LinearOptions, LinearProfile, LinearUser, LinkedInOptions, LinkedInProfile, LoginType, MicrosoftEntraIDProfile, MicrosoftOptions, NaverOptions, NaverProfile, NotionOptions, NotionProfile, PayPalOptions, PayPalProfile, PayPalTokenResponse, PaybinOptions, PaybinProfile, PhoneNumber, PolarOptions, PolarProfile, PronounOption, RailwayOptions, RailwayProfile, RedditOptions, RedditProfile, RobloxOptions, RobloxProfile, SalesforceOptions, SalesforceProfile, SlackOptions, SlackProfile, SocialProvider, SocialProviderList, SocialProviderListEnum, SocialProviders, SpotifyOptions, SpotifyProfile, TiktokOptions, TiktokProfile, TwitchOptions, TwitchProfile, TwitterOption, TwitterProfile, VercelOptions, VercelProfile, VkOption, VkProfile, WeChatOptions, WeChatProfile, ZoomOptions, ZoomProfile, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, getGooglePublicKey, getMicrosoftPublicKey, github, gitlab, google, huggingface, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paybin, paypal, polar, railway, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vercel, vk, wechat, zoom };
|
|
@@ -76,5 +76,3 @@ const socialProviderList = Object.keys(socialProviders);
|
|
|
76
76
|
const SocialProviderListEnum = z.enum(socialProviderList).or(z.string());
|
|
77
77
|
//#endregion
|
|
78
78
|
export { SocialProviderListEnum, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, getGooglePublicKey, getMicrosoftPublicKey, github, gitlab, google, huggingface, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paybin, paypal, polar, railway, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vercel, vk, wechat, zoom };
|
|
79
|
-
|
|
80
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
2
2
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
3
3
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
6
5
|
//#region src/social-providers/kakao.ts
|
|
7
6
|
const kakao = (options) => {
|
|
@@ -69,5 +68,3 @@ const kakao = (options) => {
|
|
|
69
68
|
};
|
|
70
69
|
//#endregion
|
|
71
70
|
export { kakao };
|
|
72
|
-
|
|
73
|
-
//# sourceMappingURL=kakao.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
2
2
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
3
3
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
6
5
|
//#region src/social-providers/kick.ts
|
|
7
6
|
const kick = (options) => {
|
|
@@ -67,5 +66,3 @@ const kick = (options) => {
|
|
|
67
66
|
};
|
|
68
67
|
//#endregion
|
|
69
68
|
export { kick };
|
|
70
|
-
|
|
71
|
-
//# sourceMappingURL=kick.mjs.map
|
|
@@ -102,5 +102,4 @@ declare const line: (options: LineOptions) => {
|
|
|
102
102
|
options: LineOptions;
|
|
103
103
|
};
|
|
104
104
|
//#endregion
|
|
105
|
-
export { LineIdTokenPayload, LineOptions, LineUserInfo, line };
|
|
106
|
-
//# sourceMappingURL=line.d.mts.map
|
|
105
|
+
export { LineIdTokenPayload, LineOptions, LineUserInfo, line };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
2
2
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
3
3
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
6
5
|
import { decodeJwt } from "jose";
|
|
7
6
|
//#region src/social-providers/line.ts
|
|
@@ -109,5 +108,3 @@ const line = (options) => {
|
|
|
109
108
|
};
|
|
110
109
|
//#endregion
|
|
111
110
|
export { line };
|
|
112
|
-
|
|
113
|
-
//# sourceMappingURL=line.mjs.map
|
|
@@ -65,5 +65,4 @@ declare const linear: (options: LinearOptions) => {
|
|
|
65
65
|
options: LinearOptions;
|
|
66
66
|
};
|
|
67
67
|
//#endregion
|
|
68
|
-
export { LinearOptions, LinearProfile, LinearUser, linear };
|
|
69
|
-
//# sourceMappingURL=linear.d.mts.map
|
|
68
|
+
export { LinearOptions, LinearProfile, LinearUser, linear };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
2
2
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
3
3
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
6
5
|
//#region src/social-providers/linear.ts
|
|
7
6
|
const linear = (options) => {
|
|
@@ -84,5 +83,3 @@ const linear = (options) => {
|
|
|
84
83
|
};
|
|
85
84
|
//#endregion
|
|
86
85
|
export { linear };
|
|
87
|
-
|
|
88
|
-
//# sourceMappingURL=linear.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
2
2
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
3
3
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
4
|
-
import "../oauth2/index.mjs";
|
|
5
4
|
import { betterFetch } from "@better-fetch/fetch";
|
|
6
5
|
//#region src/social-providers/linkedin.ts
|
|
7
6
|
const linkedin = (options) => {
|
|
@@ -72,5 +71,3 @@ const linkedin = (options) => {
|
|
|
72
71
|
};
|
|
73
72
|
//#endregion
|
|
74
73
|
export { linkedin };
|
|
75
|
-
|
|
76
|
-
//# sourceMappingURL=linkedin.mjs.map
|
|
@@ -171,5 +171,4 @@ declare const microsoft: (options: MicrosoftOptions) => {
|
|
|
171
171
|
};
|
|
172
172
|
declare const getMicrosoftPublicKey: (kid: string, tenant: string, authority: string) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
|
|
173
173
|
//#endregion
|
|
174
|
-
export { MicrosoftEntraIDProfile, MicrosoftOptions, getMicrosoftPublicKey, microsoft };
|
|
175
|
-
//# sourceMappingURL=microsoft-entra-id.d.mts.map
|
|
174
|
+
export { MicrosoftEntraIDProfile, MicrosoftOptions, getMicrosoftPublicKey, microsoft };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { logger } from "../env/logger.mjs";
|
|
2
|
-
import "../env/index.mjs";
|
|
3
2
|
import { APIError } from "../error/index.mjs";
|
|
4
3
|
import { createAuthorizationURL } from "../oauth2/create-authorization-url.mjs";
|
|
5
4
|
import { refreshAccessToken } from "../oauth2/refresh-access-token.mjs";
|
|
6
5
|
import { validateAuthorizationCode } from "../oauth2/validate-authorization-code.mjs";
|
|
7
|
-
import "../oauth2/index.mjs";
|
|
8
6
|
import { base64 } from "@better-auth/utils/base64";
|
|
9
7
|
import { betterFetch } from "@better-fetch/fetch";
|
|
10
8
|
import { decodeJwt, decodeProtectedHeader, importJWK, jwtVerify } from "jose";
|
|
@@ -135,5 +133,3 @@ const getMicrosoftPublicKey = async (kid, tenant, authority) => {
|
|
|
135
133
|
};
|
|
136
134
|
//#endregion
|
|
137
135
|
export { getMicrosoftPublicKey, microsoft };
|
|
138
|
-
|
|
139
|
-
//# sourceMappingURL=microsoft-entra-id.mjs.map
|