@auth/core
Advanced tools
Comparing version 0.26.2 to 0.26.3
@@ -47,3 +47,5 @@ /** | ||
export { skipCSRFCheck, raw, setEnvDefaults, createActionURL, isAuthAction }; | ||
export declare function Auth(request: Request, config: AuthConfig): Promise<ResponseInternal>; | ||
export declare function Auth(request: Request, config: AuthConfig & { | ||
raw: typeof raw; | ||
}): Promise<ResponseInternal>; | ||
export declare function Auth(request: Request, config: Omit<AuthConfig, "raw">): Promise<Response>; | ||
@@ -50,0 +52,0 @@ /** |
@@ -109,4 +109,7 @@ import * as checks from "./checks.js"; | ||
} | ||
/** Returns the user and account that is going to be created in the database. */ | ||
async function getUserAndAccount(OAuthProfile, provider, tokens, logger) { | ||
/** | ||
* Returns the user and account that is going to be created in the database. | ||
* @internal | ||
*/ | ||
export async function getUserAndAccount(OAuthProfile, provider, tokens, logger) { | ||
try { | ||
@@ -125,3 +128,3 @@ const userFromProfile = await provider.profile(OAuthProfile, tokens); | ||
type: provider.type, | ||
providerAccountId: user.id.toString(), | ||
providerAccountId: userFromProfile.id ?? crypto.randomUUID(), | ||
}, | ||
@@ -128,0 +131,0 @@ }; |
@@ -16,3 +16,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "preact/jsx-runtime"; | ||
`, | ||
} })), _jsxs("div", { className: "card", children: [theme?.logo && _jsx("img", { src: theme.logo, alt: "Logo", className: "logo" }), _jsx("h1", { children: "Signout" }), _jsx("p", { children: "Are you sure you want to sign out?" }), _jsxs("form", { action: `${url}/signout`, method: "POST", children: [_jsx("input", { type: "hidden", name: "csrfToken", value: csrfToken }), _jsx("button", { id: "submitButton", type: "submit", children: "Sign out" })] })] })] })); | ||
} })), _jsxs("div", { className: "card", children: [theme?.logo && _jsx("img", { src: theme.logo, alt: "Logo", className: "logo" }), _jsx("h1", { children: "Signout" }), _jsx("p", { children: "Are you sure you want to sign out?" }), _jsxs("form", { action: url?.toString(), method: "POST", children: [_jsx("input", { type: "hidden", name: "csrfToken", value: csrfToken }), _jsx("button", { id: "submitButton", type: "submit", children: "Sign out" })] })] })] })); | ||
} |
{ | ||
"name": "@auth/core", | ||
"version": "0.26.2", | ||
"version": "0.26.3", | ||
"description": "Authentication for the Web.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -64,3 +64,3 @@ /** | ||
request: Request, | ||
config: AuthConfig | ||
config: AuthConfig & { raw: typeof raw } | ||
): Promise<ResponseInternal> | ||
@@ -429,3 +429,3 @@ | ||
* Enable WebAuthn support. | ||
* | ||
* | ||
* @default false | ||
@@ -432,0 +432,0 @@ */ |
@@ -189,4 +189,7 @@ import * as checks from "./checks.js" | ||
/** Returns the user and account that is going to be created in the database. */ | ||
async function getUserAndAccount( | ||
/** | ||
* Returns the user and account that is going to be created in the database. | ||
* @internal | ||
*/ | ||
export async function getUserAndAccount( | ||
OAuthProfile: Profile, | ||
@@ -211,3 +214,3 @@ provider: OAuthConfigInternal<any>, | ||
type: provider.type, | ||
providerAccountId: user.id.toString(), | ||
providerAccountId: userFromProfile.id ?? crypto.randomUUID(), | ||
}, | ||
@@ -214,0 +217,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1522166
38392