mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 04:19:20 +00:00
chore: upgrade better-call
This commit is contained in:
@@ -93,7 +93,7 @@
|
||||
"@simplewebauthn/browser": "^10.0.0",
|
||||
"@simplewebauthn/server": "^10.0.1",
|
||||
"arctic": "2.0.0-next.9",
|
||||
"better-call": "0.2.5",
|
||||
"better-call": "0.2.6",
|
||||
"c12": "^1.11.2",
|
||||
"chalk": "^5.3.0",
|
||||
"commander": "^12.1.0",
|
||||
|
||||
@@ -79,12 +79,12 @@ export const signInOAuth = createAuthEndpoint(
|
||||
"redirect_uri",
|
||||
`${c.context.baseURL}/callback/${c.body.provider}`,
|
||||
);
|
||||
return {
|
||||
return c.json({
|
||||
url: url.toString(),
|
||||
state: state.state,
|
||||
codeVerifier,
|
||||
redirect: true,
|
||||
};
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -100,8 +100,10 @@ export function getCookies(options: BetterAuthOptions) {
|
||||
|
||||
export function createCookieGetter(options: BetterAuthOptions) {
|
||||
const secure =
|
||||
!!options.advanced?.useSecureCookies ||
|
||||
process.env.NODE_ENV === "production";
|
||||
options.advanced?.useSecureCookies !== undefined
|
||||
? options.advanced?.useSecureCookies
|
||||
: options.baseURL?.startsWith("https://") ||
|
||||
process.env.NODE_ENV === "production";
|
||||
const secureCookiePrefix = secure ? "__Secure-" : "";
|
||||
const cookiePrefix = "better-auth";
|
||||
|
||||
@@ -164,12 +166,6 @@ export function deleteSessionCookie(ctx: GenericEndpointContext) {
|
||||
ctx.setCookie(ctx.context.authCookies.sessionToken.name, "", {
|
||||
maxAge: 0,
|
||||
});
|
||||
ctx.setCookie(ctx.context.authCookies.pkCodeVerifier.name, "", {
|
||||
maxAge: 0,
|
||||
});
|
||||
ctx.setCookie(ctx.context.authCookies.state.name, "", {
|
||||
maxAge: 0,
|
||||
});
|
||||
ctx.setCookie(ctx.context.authCookies.dontRememberToken.name, "", {
|
||||
maxAge: 0,
|
||||
});
|
||||
|
||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -1478,8 +1478,8 @@ importers:
|
||||
specifier: 2.0.0-next.9
|
||||
version: 2.0.0-next.9
|
||||
better-call:
|
||||
specifier: 0.2.5
|
||||
version: 0.2.5
|
||||
specifier: 0.2.6
|
||||
version: 0.2.6
|
||||
c12:
|
||||
specifier: ^1.11.2
|
||||
version: 1.11.2(magicast@0.3.5)
|
||||
@@ -6874,8 +6874,8 @@ packages:
|
||||
better-call@0.2.3-beta.2:
|
||||
resolution: {integrity: sha512-ybOtGcR4pOsHI2XE+urR9zcmK+s0YnhJSx8KDj6ul7MUEyYOiMEnq/bylyH62/7qXuYb9q8Oqkp9NF9vWOZ4Mg==}
|
||||
|
||||
better-call@0.2.5:
|
||||
resolution: {integrity: sha512-110c1YTmkPsdHs3+xqXZd+h56EuXYh/E5Wy7ILfjpv9ZefyXPFcvLSVEy/ikosIdISoXHJJjt3m9dphGEHK54A==}
|
||||
better-call@0.2.6:
|
||||
resolution: {integrity: sha512-RoIOW8Qm/y3FBIkAMaGlgpc/mc7g2i9HJ6lHdyiORXdUpzm1tv9eWD73aeeOmxVcJaQ9F65e6aIL+6kMsmO2hA==}
|
||||
|
||||
better-sqlite3@11.3.0:
|
||||
resolution: {integrity: sha512-iHt9j8NPYF3oKCNOO5ZI4JwThjt3Z6J6XrcwG85VNMVzv1ByqrHWv5VILEbCMFWDsoHhXvQ7oC8vgRXFAKgl9w==}
|
||||
@@ -21532,7 +21532,7 @@ snapshots:
|
||||
set-cookie-parser: 2.7.0
|
||||
typescript: 5.6.2
|
||||
|
||||
better-call@0.2.5:
|
||||
better-call@0.2.6:
|
||||
dependencies:
|
||||
'@better-fetch/fetch': 1.1.9
|
||||
'@types/set-cookie-parser': 2.4.10
|
||||
|
||||
Reference in New Issue
Block a user