Socket
Socket
Sign inDemoInstall

@auth/core

Package Overview
Dependencies
Maintainers
2
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@auth/core - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

adapters.d.ts

@@ -1,2 +0,2 @@

import type { Account, Awaitable, User } from ".";
import type { Account, Awaitable, User } from "./index.js";
export interface AdapterUser extends User {

@@ -3,0 +3,0 @@ id: string;

@@ -1,3 +0,3 @@

import type { AuthOptions } from "./lib/types";
export * from "./lib/types";
import type { AuthOptions } from "./lib/types.js";
export * from "./lib/types.js";
/**

@@ -4,0 +4,0 @@ * The core functionality of Auth.js.

@@ -1,10 +0,10 @@

import { init } from "./lib/init";
import { assertConfig } from "./lib/assert";
import { SessionStore } from "./lib/cookie";
import { toInternalRequest, toResponse } from "./lib/web";
import renderPage from "./lib/pages";
import * as routes from "./lib/routes";
import logger, { setLogger } from "./lib/utils/logger";
import { UntrustedHost } from "./lib/errors";
export * from "./lib/types";
import { init } from "./lib/init.js";
import { assertConfig } from "./lib/assert.js";
import { SessionStore } from "./lib/cookie.js";
import { toInternalRequest, toResponse } from "./lib/web.js";
import renderPage from "./lib/pages/index.js";
import * as routes from "./lib/routes/index.js";
import logger, { setLogger } from "./lib/utils/logger.js";
import { UntrustedHost } from "./lib/errors.js";
export * from "./lib/types.js";
const configErrorMessage = "There is a problem with the server configuration. Check the server logs for more information.";

@@ -11,0 +11,0 @@ async function AuthHandlerInternal(params) {

@@ -1,4 +0,4 @@

import type { JWT, JWTDecodeParams, JWTEncodeParams, JWTOptions } from "./types";
import type { LoggerInstance } from "..";
export * from "./types";
import type { JWT, JWTDecodeParams, JWTEncodeParams, JWTOptions } from "./types.js";
import type { LoggerInstance } from "../index.js";
export * from "./types.js";
/** Issues a JWT. By default, the JWT is encrypted using "A256GCM". */

@@ -5,0 +5,0 @@ export declare function encode(params: JWTEncodeParams): Promise<string>;

import { EncryptJWT, jwtDecrypt } from "jose";
import hkdf from "@panva/hkdf";
import { SessionStore } from "../lib/cookie";
export * from "./types";
import { hkdf } from "@panva/hkdf";
import { SessionStore } from "../lib/cookie.js";
export * from "./types.js";
const DEFAULT_MAX_AGE = 30 * 24 * 60 * 60; // 30 days

@@ -6,0 +6,0 @@ const now = () => (Date.now() / 1000) | 0;

/// <reference types="node" />
import type { Awaitable } from "..";
import type { Awaitable } from "../index.js";
export interface DefaultJWT extends Record<string, unknown> {

@@ -4,0 +4,0 @@ name?: string | null;

@@ -1,4 +0,4 @@

import { InvalidCallbackUrl, InvalidEndpoints, MissingAdapter, MissingAdapterMethods, MissingAPIRoute, MissingAuthorize, MissingSecret, UnsupportedStrategy } from "./errors";
import type { AuthOptions, RequestInternal } from "..";
import type { WarningCode } from "./utils/logger";
import { InvalidCallbackUrl, InvalidEndpoints, MissingAdapter, MissingAdapterMethods, MissingAPIRoute, MissingAuthorize, MissingSecret, UnsupportedStrategy } from "./errors.js";
import type { AuthOptions, RequestInternal } from "../index.js";
import type { WarningCode } from "./utils/logger.js";
declare type ConfigError = MissingAdapter | MissingAdapterMethods | MissingAPIRoute | MissingAuthorize | MissingSecret | InvalidCallbackUrl | UnsupportedStrategy | InvalidEndpoints | UnsupportedStrategy;

@@ -5,0 +5,0 @@ /**

@@ -1,3 +0,3 @@

import { InvalidCallbackUrl, InvalidEndpoints, MissingAdapter, MissingAdapterMethods, MissingAPIRoute, MissingAuthorize, MissingSecret, UnsupportedStrategy, } from "./errors";
import { defaultCookies } from "./cookie";
import { InvalidCallbackUrl, InvalidEndpoints, MissingAdapter, MissingAdapterMethods, MissingAPIRoute, MissingAuthorize, MissingSecret, UnsupportedStrategy, } from "./errors.js";
import { defaultCookies } from "./cookie.js";
let warned = false;

@@ -4,0 +4,0 @@ function isValidHttpUrl(url, baseUrl) {

@@ -1,5 +0,5 @@

import type { Account, InternalOptions, User } from "..";
import type { AdapterSession, AdapterUser } from "../adapters";
import type { JWT } from "../jwt";
import type { SessionToken } from "./cookie";
import type { Account, InternalOptions, User } from "../index.js";
import type { AdapterSession, AdapterUser } from "../adapters.js";
import type { JWT } from "../jwt/index.js";
import type { SessionToken } from "./cookie.js";
/**

@@ -6,0 +6,0 @@ * This function handles the complex flow of signing users in, and either creating,

@@ -1,3 +0,3 @@

import { AccountNotLinkedError } from "./errors";
import { fromDate } from "./utils/date";
import { AccountNotLinkedError } from "./errors.js";
import { fromDate } from "./utils/date.js";
/**

@@ -4,0 +4,0 @@ * This function handles the complex flow of signing users in, and either creating,

@@ -1,2 +0,2 @@

import type { InternalOptions } from "..";
import type { InternalOptions } from "../index.js";
interface CreateCallbackUrlParams {

@@ -3,0 +3,0 @@ options: InternalOptions;

@@ -1,2 +0,2 @@

import type { CookieOption, CookiesOptions, LoggerInstance, SessionStrategy } from "..";
import type { CookieOption, CookiesOptions, LoggerInstance, SessionStrategy } from "../index.js";
/** Stringified form of `JWT`. Extract the content with `jwt.decode` */

@@ -3,0 +3,0 @@ export declare type JWTString = string;

@@ -1,2 +0,2 @@

import type { InternalOptions } from "./types";
import type { InternalOptions } from "./types.js";
interface CreateCSRFTokenParams {

@@ -3,0 +3,0 @@ options: InternalOptions;

@@ -1,2 +0,2 @@

import { createHash, randomString } from "./web";
import { createHash, randomString } from "./web.js";
/**

@@ -3,0 +3,0 @@ * Ensure CSRF Token cookie is set for any subsequent requests.

@@ -1,3 +0,3 @@

import type { CallbacksOptions } from "..";
import type { CallbacksOptions } from "../index.js";
export declare const defaultCallbacks: CallbacksOptions;
//# sourceMappingURL=default-callbacks.d.ts.map

@@ -1,3 +0,3 @@

import type { AdapterUser } from "../../adapters";
import type { InternalOptions } from "../..";
import type { AdapterUser } from "../../adapters.js";
import type { InternalOptions } from "../../index.js";
/**

@@ -4,0 +4,0 @@ * Query the database for a user by email address.

@@ -1,2 +0,2 @@

import type { InternalOptions } from "../..";
import type { InternalOptions } from "../../index.js";
/**

@@ -3,0 +3,0 @@ * Starts an e-mail login flow, by generating a token,

@@ -1,2 +0,2 @@

import { randomString, createHash } from "../web";
import { randomString, createHash } from "../web.js";
/**

@@ -3,0 +3,0 @@ * Starts an e-mail login flow, by generating a token,

@@ -1,2 +0,2 @@

import type { EventCallbacks, LoggerInstance } from "./types";
import type { EventCallbacks, LoggerInstance } from "./types.js";
/**

@@ -3,0 +3,0 @@ * Same as the default `Error`, but it is JSON serializable.

@@ -1,3 +0,3 @@

import * as cookie from "./cookie";
import type { AuthOptions, InternalOptions, RequestInternal } from "..";
import * as cookie from "./cookie.js";
import type { AuthOptions, InternalOptions, RequestInternal } from "../index.js";
interface InitParams {

@@ -4,0 +4,0 @@ url: URL;

@@ -1,10 +0,10 @@

import { adapterErrorHandler, eventsErrorHandler } from "./errors";
import * as jwt from "../jwt";
import { createCallbackUrl } from "./callback-url";
import * as cookie from "./cookie";
import { createCSRFToken } from "./csrf-token";
import { defaultCallbacks } from "./default-callbacks";
import parseProviders from "./providers";
import logger from "./utils/logger";
import parseUrl from "./utils/parse-url";
import { adapterErrorHandler, eventsErrorHandler } from "./errors.js";
import * as jwt from "../jwt/index.js";
import { createCallbackUrl } from "./callback-url.js";
import * as cookie from "./cookie.js";
import { createCSRFToken } from "./csrf-token.js";
import { defaultCallbacks } from "./default-callbacks.js";
import parseProviders from "./providers.js";
import logger from "./utils/logger.js";
import parseUrl from "./utils/parse-url.js";
/** Initialize all internal options and cookies. */

@@ -11,0 +11,0 @@ export async function init({ authOptions, providerId, action, url: reqUrl, cookies: reqCookies, callbackUrl: reqCallbackUrl, csrfToken: reqCsrfToken, isPost, }) {

@@ -1,3 +0,3 @@

import type { CookiesOptions, InternalOptions, RequestInternal, ResponseInternal } from "../..";
import type { Cookie } from "../cookie";
import type { CookiesOptions, InternalOptions, RequestInternal, ResponseInternal } from "../../index.js";
import type { Cookie } from "../cookie.js";
/**

@@ -4,0 +4,0 @@ * Generates an authorization/request token URL.

@@ -1,3 +0,3 @@

import type { InternalOptions, Profile, RequestInternal } from "../..";
import type { Cookie } from "../cookie";
import type { InternalOptions, Profile, RequestInternal } from "../../index.js";
import type { Cookie } from "../cookie.js";
export declare function handleOAuthCallback(params: {

@@ -10,3 +10,3 @@ options: InternalOptions<"oauth">;

cookies: Cookie[];
profile?: import("../types").User | undefined;
profile?: import("../types.js").User | undefined;
account?: {

@@ -13,0 +13,0 @@ access_token?: string | undefined;

@@ -1,5 +0,5 @@

import { OAuthCallbackError } from "../errors";
import { useNonce } from "./nonce-handler";
import { usePKCECodeVerifier } from "./pkce-handler";
import { useState } from "./state-handler";
import { OAuthCallbackError } from "../errors.js";
import { useNonce } from "./nonce-handler.js";
import { usePKCECodeVerifier } from "./pkce-handler.js";
import { useState } from "./state-handler.js";
import * as o from "oauth4webapi";

@@ -6,0 +6,0 @@ export async function handleOAuthCallback(params) {

@@ -1,3 +0,3 @@

import type { InternalOptions } from "../..";
import type { Cookie } from "../cookie";
import type { InternalOptions } from "../../index.js";
import type { Cookie } from "../cookie.js";
/**

@@ -4,0 +4,0 @@ * Returns nonce if the provider supports it

import * as o from "oauth4webapi";
import * as jwt from "../../jwt";
import * as jwt from "../../jwt/index.js";
const NONCE_MAX_AGE = 60 * 15; // 15 minutes in seconds

@@ -4,0 +4,0 @@ /**

@@ -1,3 +0,3 @@

import type { InternalOptions } from "../..";
import type { Cookie } from "../cookie";
import type { InternalOptions } from "../../index.js";
import type { Cookie } from "../cookie.js";
/**

@@ -4,0 +4,0 @@ * Returns `code_challenge` and `code_challenge_method`

import * as o from "oauth4webapi";
import * as jwt from "../../jwt";
import * as jwt from "../../jwt/index.js";
const PKCE_CODE_CHALLENGE_METHOD = "S256";

@@ -4,0 +4,0 @@ const PKCE_MAX_AGE = 60 * 15; // 15 minutes in seconds

@@ -1,3 +0,3 @@

import type { InternalOptions } from "../..";
import type { Cookie } from "../cookie";
import type { InternalOptions } from "../../index.js";
import type { Cookie } from "../cookie.js";
/** Returns state if the provider supports it */

@@ -4,0 +4,0 @@ export declare function createState(options: InternalOptions<"oauth">): Promise<{

@@ -1,2 +0,2 @@

import type { Theme } from "../..";
import type { Theme } from "../../index.js";
/**

@@ -3,0 +3,0 @@ * The following errors are passed as error query parameters to the default or overridden error page.

@@ -1,4 +0,4 @@

import type { InternalOptions, RequestInternal, ResponseInternal } from "../..";
import type { Cookie } from "../cookie";
import type { ErrorType } from "./error";
import type { InternalOptions, RequestInternal, ResponseInternal } from "../../index.js";
import type { Cookie } from "../cookie.js";
import type { ErrorType } from "./error.js";
declare type RenderPageParams = {

@@ -5,0 +5,0 @@ query?: RequestInternal["query"];

@@ -1,7 +0,7 @@

import renderToString from "preact-render-to-string";
import css from "../styles";
import ErrorPage from "./error";
import SigninPage from "./signin";
import SignoutPage from "./signout";
import VerifyRequestPage from "./verify-request";
import { renderToString } from "preact-render-to-string";
import css from "../styles/index.js";
import ErrorPage from "./error.js";
import SigninPage from "./signin.js";
import SignoutPage from "./signout.js";
import VerifyRequestPage from "./verify-request.js";
/**

@@ -8,0 +8,0 @@ * Unless the user defines their [own pages](https://next-auth.js.org/configuration/pages),

@@ -1,2 +0,2 @@

import type { InternalProvider, Theme } from "../..";
import type { InternalProvider, Theme } from "../../index.js";
/**

@@ -3,0 +3,0 @@ * The following errors are passed as error query parameters to the default or overridden sign-in page.

@@ -1,2 +0,2 @@

import type { Theme } from "../..";
import type { Theme } from "../../index.js";
export interface SignoutProps {

@@ -3,0 +3,0 @@ url: URL;

@@ -1,2 +0,2 @@

import type { Theme } from "../..";
import type { Theme } from "../../index.js";
interface VerifyRequestPageProps {

@@ -3,0 +3,0 @@ url: URL;

@@ -1,3 +0,3 @@

import type { InternalProvider } from "..";
import type { Provider } from "../providers";
import type { InternalProvider } from "../index.js";
import type { Provider } from "../providers/index.js";
/**

@@ -4,0 +4,0 @@ * Adds `signinUrl` and `callbackUrl` to each provider

@@ -1,2 +0,2 @@

import { merge } from "./utils/merge";
import { merge } from "./utils/merge.js";
/**

@@ -3,0 +3,0 @@ * Adds `signinUrl` and `callbackUrl` to each provider

@@ -1,4 +0,4 @@

import type { RequestInternal, ResponseInternal } from "../..";
import type { SessionStore } from "../cookie";
import type { InternalOptions } from "../types";
import type { RequestInternal, ResponseInternal } from "../../index.js";
import type { SessionStore } from "../cookie.js";
import type { InternalOptions } from "../types.js";
/** Handle callbacks from login services */

@@ -5,0 +5,0 @@ export declare function callback(params: {

@@ -1,5 +0,5 @@

import callbackHandler from "../callback-handler";
import getAdapterUserFromEmail from "../email/getUserFromEmail";
import { handleOAuthCallback } from "../oauth/callback";
import { createHash } from "../web";
import callbackHandler from "../callback-handler.js";
import getAdapterUserFromEmail from "../email/getUserFromEmail.js";
import { handleOAuthCallback } from "../oauth/callback.js";
import { createHash } from "../web.js";
/** Handle callbacks from login services */

@@ -6,0 +6,0 @@ export async function callback(params) {

@@ -1,6 +0,6 @@

export { callback } from "./callback";
export { providers } from "./providers";
export { session } from "./session";
export { signin } from "./signin";
export { signout } from "./signout";
export { callback } from "./callback.js";
export { providers } from "./providers.js";
export { session } from "./session.js";
export { signin } from "./signin.js";
export { signout } from "./signout.js";
//# sourceMappingURL=index.d.ts.map

@@ -1,5 +0,5 @@

export { callback } from "./callback";
export { providers } from "./providers";
export { session } from "./session";
export { signin } from "./signin";
export { signout } from "./signout";
export { callback } from "./callback.js";
export { providers } from "./providers.js";
export { session } from "./session.js";
export { signin } from "./signin.js";
export { signout } from "./signout.js";

@@ -1,2 +0,2 @@

import type { InternalProvider, ResponseInternal } from "../..";
import type { InternalProvider, ResponseInternal } from "../../index.js";
export interface PublicProvider {

@@ -3,0 +3,0 @@ id: string;

@@ -1,3 +0,3 @@

import type { InternalOptions, ResponseInternal, Session } from "../..";
import type { SessionStore } from "../cookie";
import type { InternalOptions, ResponseInternal, Session } from "../../index.js";
import type { SessionStore } from "../cookie.js";
interface SessionParams {

@@ -4,0 +4,0 @@ options: InternalOptions;

@@ -1,2 +0,2 @@

import { fromDate } from "../utils/date";
import { fromDate } from "../utils/date.js";
/**

@@ -3,0 +3,0 @@ * Return a session object (without any private fields)

@@ -1,2 +0,2 @@

import type { InternalOptions, RequestInternal, ResponseInternal } from "../..";
import type { InternalOptions, RequestInternal, ResponseInternal } from "../../index.js";
/** Handle requests to /api/auth/signin */

@@ -3,0 +3,0 @@ export declare function signin(params: {

@@ -1,4 +0,4 @@

import getAdapterUserFromEmail from "../email/getUserFromEmail";
import emailSignin from "../email/signin";
import { getAuthorizationUrl } from "../oauth/authorization-url";
import getAdapterUserFromEmail from "../email/getUserFromEmail.js";
import emailSignin from "../email/signin.js";
import { getAuthorizationUrl } from "../oauth/authorization-url.js";
/** Handle requests to /api/auth/signin */

@@ -5,0 +5,0 @@ export async function signin(params) {

@@ -1,3 +0,3 @@

import type { InternalOptions, ResponseInternal } from "../..";
import type { SessionStore } from "../cookie";
import type { InternalOptions, ResponseInternal } from "../../index.js";
import type { SessionStore } from "../cookie.js";
/** Handle requests to /api/auth/signout */

@@ -4,0 +4,0 @@ export declare function signout(params: {

import type { CookieSerializeOptions } from "cookie";
import type { Adapter, AdapterUser } from "../adapters";
import type { CredentialInput, Provider, ProviderType } from "../providers";
import type { Adapter, AdapterUser } from "../adapters.js";
import type { CredentialInput, Provider, ProviderType } from "../providers/index.js";
import type { OAuth2TokenEndpointResponse, OpenIDTokenEndpointResponse } from "oauth4webapi";
import type { JWT, JWTOptions } from "../jwt";
import type { LoggerInstance } from "./utils/logger";
import type { JWT, JWTOptions } from "../jwt/types.js";
import type { LoggerInstance } from "./utils/logger.js";
export declare type Awaitable<T> = T | PromiseLike<T>;
export type { LoggerInstance };

@@ -8,0 +9,0 @@ /**

@@ -1,2 +0,2 @@

import { UnknownError } from "../errors";
import { UnknownError } from "../errors.js";
/** Makes sure that error is always serializable */

@@ -3,0 +3,0 @@ function formatError(o) {

@@ -1,2 +0,2 @@

import type { RequestInternal, ResponseInternal } from "..";
import type { RequestInternal, ResponseInternal } from "../index.js";
export declare function toInternalRequest(req: Request): Promise<RequestInternal | Error>;

@@ -3,0 +3,0 @@ export declare function toResponse(res: ResponseInternal): Response;

import { parse as parseCookie, serialize } from "cookie";
import { UnknownAction } from "./errors";
import { UnknownAction } from "./errors.js";
async function getBody(req) {

@@ -4,0 +4,0 @@ if (!("body" in req) || !req.body || req.method !== "POST")

{
"name": "@auth/core",
"version": "0.1.3",
"version": "0.1.4",
"description": "Authentication for the web.",

@@ -5,0 +5,0 @@ "homepage": "https://authjs.dev",

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface UserData {

@@ -3,0 +3,0 @@ id: number;

@@ -1,2 +0,2 @@

import { OAuthConfig, OAuthUserConfig } from ".";
import { OAuthConfig, OAuthUserConfig } from "./index.js";
/**

@@ -3,0 +3,0 @@ * See more at:

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
interface AtlassianProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ account_id: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface Auth0Profile extends Record<string, any> {

@@ -3,0 +3,0 @@ sub: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface AuthentikProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ iss: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface AzureB2CProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ exp: number;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface AzureADProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ sub: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface BattleNetProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ sub: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface BoxyHQSAMLProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ id: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface CognitoProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ sub: string;

@@ -1,3 +0,3 @@

import type { CommonProviderOptions } from ".";
import type { Awaitable, RequestInternal, User } from "..";
import type { CommonProviderOptions } from "./index.js";
import type { Awaitable, RequestInternal, User } from "../index.js";
export interface CredentialInput {

@@ -4,0 +4,0 @@ label?: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface DiscordProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ accent_color: number;

@@ -1,4 +0,4 @@

import type { CommonProviderOptions } from ".";
import type { CommonProviderOptions } from "./index.js";
import type { Options as SMTPTransportOptions } from "nodemailer/lib/smtp-transport";
import type { Awaitable, Theme } from "..";
import type { Awaitable, Theme } from "../index.js";
export interface SendVerificationRequestParams {

@@ -5,0 +5,0 @@ identifier: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface EVEOnlineProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ CharacterID: number;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
interface FacebookPictureData {

@@ -3,0 +3,0 @@ url: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
/** @see https://docs.github.com/en/rest/users/users#get-the-authenticated-user */

@@ -3,0 +3,0 @@ export interface GithubProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface GitLabProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ id: number;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface GoogleProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ aud: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
interface HubSpotProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ user: string;

@@ -1,7 +0,7 @@

import type { OAuthConfig, OAuthProvider, OAuthProviderType } from "./oauth";
import type { EmailConfig, EmailProvider, EmailProviderType } from "./email";
import type { CredentialsConfig, CredentialsProvider, CredentialsProviderType } from "./credentials";
export * from "./credentials";
export * from "./email";
export * from "./oauth";
import type { OAuthConfig, OAuthProvider, OAuthProviderType } from "./oauth.js";
import type { EmailConfig, EmailProvider, EmailProviderType } from "./email.js";
import type { CredentialsConfig, CredentialsProvider, CredentialsProviderType } from "./credentials.js";
export * from "./credentials.js";
export * from "./email.js";
export * from "./oauth.js";
export declare type ProviderType = "oidc" | "oauth" | "email" | "credentials";

@@ -8,0 +8,0 @@ export interface CommonProviderOptions {

@@ -1,3 +0,3 @@

export * from "./credentials";
export * from "./email";
export * from "./oauth";
export * from "./credentials.js";
export * from "./email.js";
export * from "./oauth.js";

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export declare type DateTime = string;

@@ -3,0 +3,0 @@ export declare type Gender = "female" | "male";

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface KeycloakProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ exp: number;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface LineProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ iss: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
interface Identifier {

@@ -3,0 +3,0 @@ identifier: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
/** https://developers.naver.com/docs/login/profile/profile.md */

@@ -3,0 +3,0 @@ export interface NaverProfile extends Record<string, any> {

@@ -1,3 +0,3 @@

import type { CommonProviderOptions } from "../providers";
import type { Profile, TokenSet, User, Awaitable } from "..";
import type { CommonProviderOptions } from "../providers/index.js";
import type { Profile, TokenSet, User, Awaitable } from "../index.js";
import type { Client } from "oauth4webapi";

@@ -9,3 +9,3 @@ declare type AuthorizationParameters = any;

declare type OpenIDCallbackChecks = any;
export type { OAuthProviderType } from "./oauth-types";
export type { OAuthProviderType } from "./oauth-types.js";
declare type ChecksType = "pkce" | "state" | "none" | "nonce";

@@ -69,2 +69,13 @@ export declare type OAuthChecks = OpenIDCallbackChecks | OAuthCallbackChecks;

/**
* Identifies the provider when you want to sign in to
* a specific provider.
* @example
* ```js
* signIn('github') // "github" is the provider ID
* ```
*/
id: string;
/** The name of the provider. shown on the default sign in page. */
name: string;
/**
* OpenID Connect (OIDC) compliant providers can configure

@@ -71,0 +82,0 @@ * this instead of `authorize`/`token`/`userinfo` options

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface OktaProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ iss: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface OsuUserCompact {

@@ -3,0 +3,0 @@ avatar_url: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface PatreonProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ sub: string;

@@ -1,2 +0,2 @@

import { OAuthConfig, OAuthUserConfig } from ".";
import { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface PinterestProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ account_type: "BUSINESS" | "PINNER";

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface PipedriveProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ success: boolean;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface SalesforceProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ sub: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface SlackProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ ok: boolean;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface SpotifyImage {

@@ -3,0 +3,0 @@ url: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface StravaProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ id: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
/**

@@ -3,0 +3,0 @@ * @see https://developer.todoist.com/sync/v9/#user

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface TraktUser extends Record<string, any> {

@@ -3,0 +3,0 @@ username: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface TwitchProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ sub: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface TwitterLegacyProfile {

@@ -3,0 +3,0 @@ id: number;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface UnitedEffectsProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ sub: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface VkProfile {

@@ -3,0 +3,0 @@ response: Array<{

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export declare type WikimediaGroup = "*" | "user" | "autoconfirmed" | "extendedconfirmed" | "bot" | "sysop" | "bureaucrat" | "steward" | "accountcreator" | "import" | "transwiki" | "ipblock-exempt" | "oversight" | "rollbacker" | "propertycreator" | "wikidata-staff" | "flood" | "translationadmin" | "confirmed" | "flow-bot" | "checkuser";

@@ -3,0 +3,0 @@ export declare type WikimediaGrant = "basic" | "blockusers" | "checkuser" | "createaccount" | "delete" | "editinterface" | "editmycssjs" | "editmyoptions" | "editmywatchlist" | "editpage" | "editprotected" | "editsiteconfig" | "globalblock" | "highvolume" | "import" | "mergehistory" | "oath" | "oversight" | "patrol" | "privateinfo" | "protect" | "rollback" | "sendemail" | "shortenurls" | "uploadfile" | "viewdeleted" | "viewmywatchlist";

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface WorkOSProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ object: string;

@@ -1,2 +0,2 @@

import type { OIDCConfig, OAuthUserConfig } from ".";
import type { OIDCConfig, OAuthUserConfig } from "./index.js";
export interface ZitadelProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ amr: string;

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from ".";
import type { OAuthConfig, OAuthUserConfig } from "./index.js";
export interface ZoomProfile extends Record<string, any> {

@@ -3,0 +3,0 @@ id: string;

@@ -1,2 +0,2 @@

import type { Account, Awaitable, User } from "."
import type { Account, Awaitable, User } from "./index.js"

@@ -3,0 +3,0 @@ export interface AdapterUser extends User {

@@ -1,10 +0,10 @@

import { init } from "./lib/init"
import { assertConfig } from "./lib/assert"
import { SessionStore } from "./lib/cookie"
import { toInternalRequest, toResponse } from "./lib/web"
import renderPage from "./lib/pages"
import * as routes from "./lib/routes"
import logger, { setLogger } from "./lib/utils/logger"
import { init } from "./lib/init.js"
import { assertConfig } from "./lib/assert.js"
import { SessionStore } from "./lib/cookie.js"
import { toInternalRequest, toResponse } from "./lib/web.js"
import renderPage from "./lib/pages/index.js"
import * as routes from "./lib/routes/index.js"
import logger, { setLogger } from "./lib/utils/logger.js"
import type { ErrorType } from "./lib/pages/error"
import type { ErrorType } from "./lib/pages/error.js"
import type {

@@ -14,6 +14,6 @@ AuthOptions,

ResponseInternal,
} from "./lib/types"
import { UntrustedHost } from "./lib/errors"
} from "./lib/types.js"
import { UntrustedHost } from "./lib/errors.js"
export * from "./lib/types"
export * from "./lib/types.js"

@@ -39,3 +39,3 @@ const configErrorMessage =

// Bail out early if there's an error in the user config
logger.error(assertionResult.code, assertionResult)
logger.error((assertionResult as any).code, assertionResult)

@@ -42,0 +42,0 @@ const htmlPages = ["signin", "signout", "error", "verify-request"]

import { EncryptJWT, jwtDecrypt } from "jose"
import hkdf from "@panva/hkdf"
import { SessionStore } from "../lib/cookie"
import type { JWT, JWTDecodeParams, JWTEncodeParams, JWTOptions } from "./types"
import type { LoggerInstance } from ".."
import { hkdf } from "@panva/hkdf"
import { SessionStore } from "../lib/cookie.js"
import type {
JWT,
JWTDecodeParams,
JWTEncodeParams,
JWTOptions,
} from "./types.js"
import type { LoggerInstance } from "../index.js"
export * from "./types"
export * from "./types.js"

@@ -9,0 +14,0 @@ const DEFAULT_MAX_AGE = 30 * 24 * 60 * 60 // 30 days

@@ -1,2 +0,2 @@

import type { Awaitable } from ".."
import type { Awaitable } from "../index.js"

@@ -3,0 +3,0 @@ export interface DefaultJWT extends Record<string, unknown> {

@@ -10,7 +10,7 @@ import {

UnsupportedStrategy,
} from "./errors"
import { defaultCookies } from "./cookie"
} from "./errors.js"
import { defaultCookies } from "./cookie.js"
import type { AuthOptions, RequestInternal } from ".."
import type { WarningCode } from "./utils/logger"
import type { AuthOptions, RequestInternal } from "../index.js"
import type { WarningCode } from "./utils/logger.js"

@@ -17,0 +17,0 @@ type ConfigError =

@@ -1,9 +0,9 @@

import { AccountNotLinkedError } from "./errors"
import { fromDate } from "./utils/date"
import { AccountNotLinkedError } from "./errors.js"
import { fromDate } from "./utils/date.js"
import type { Account, InternalOptions, User } from ".."
import type { AdapterSession, AdapterUser } from "../adapters"
import type { JWT } from "../jwt"
import type { OAuthConfig } from "../providers"
import type { SessionToken } from "./cookie"
import type { Account, InternalOptions, User } from "../index.js"
import type { AdapterSession, AdapterUser } from "../adapters.js"
import type { JWT } from "../jwt/index.js"
import type { OAuthConfig } from "../providers/index.js"
import type { SessionToken } from "./cookie.js"

@@ -10,0 +10,0 @@ /**

@@ -1,2 +0,2 @@

import type { InternalOptions } from ".."
import type { InternalOptions } from "../index.js"

@@ -3,0 +3,0 @@ interface CreateCallbackUrlParams {

@@ -6,3 +6,3 @@ import type {

SessionStrategy,
} from ".."
} from "../index.js"

@@ -9,0 +9,0 @@ // Uncomment to recalculate the estimated size

@@ -1,3 +0,3 @@

import { createHash, randomString } from "./web"
import type { InternalOptions } from "./types"
import { createHash, randomString } from "./web.js"
import type { InternalOptions } from "./types.js"

@@ -4,0 +4,0 @@ interface CreateCSRFTokenParams {

@@ -1,2 +0,2 @@

import type { CallbacksOptions } from ".."
import type { CallbacksOptions } from "../index.js"

@@ -3,0 +3,0 @@ export const defaultCallbacks: CallbacksOptions = {

@@ -1,3 +0,3 @@

import type { AdapterUser } from "../../adapters"
import type { InternalOptions } from "../.."
import type { AdapterUser } from "../../adapters.js"
import type { InternalOptions } from "../../index.js"

@@ -4,0 +4,0 @@ /**

@@ -1,3 +0,3 @@

import { randomString, createHash } from "../web"
import type { InternalOptions } from "../.."
import { randomString, createHash } from "../web.js"
import type { InternalOptions } from "../../index.js"

@@ -4,0 +4,0 @@ /**

@@ -1,2 +0,2 @@

import type { EventCallbacks, LoggerInstance } from "./types"
import type { EventCallbacks, LoggerInstance } from "./types.js"

@@ -3,0 +3,0 @@ /**

@@ -1,12 +0,12 @@

import { adapterErrorHandler, eventsErrorHandler } from "./errors"
import * as jwt from "../jwt"
import { createCallbackUrl } from "./callback-url"
import * as cookie from "./cookie"
import { createCSRFToken } from "./csrf-token"
import { defaultCallbacks } from "./default-callbacks"
import parseProviders from "./providers"
import logger from "./utils/logger"
import parseUrl from "./utils/parse-url"
import { adapterErrorHandler, eventsErrorHandler } from "./errors.js"
import * as jwt from "../jwt/index.js"
import { createCallbackUrl } from "./callback-url.js"
import * as cookie from "./cookie.js"
import { createCSRFToken } from "./csrf-token.js"
import { defaultCallbacks } from "./default-callbacks.js"
import parseProviders from "./providers.js"
import logger from "./utils/logger.js"
import parseUrl from "./utils/parse-url.js"
import type { AuthOptions, InternalOptions, RequestInternal } from ".."
import type { AuthOptions, InternalOptions, RequestInternal } from "../index.js"

@@ -13,0 +13,0 @@ interface InitParams {

@@ -8,4 +8,4 @@ import * as o from "oauth4webapi"

ResponseInternal,
} from "../.."
import type { Cookie } from "../cookie"
} from "../../index.js"
import type { Cookie } from "../cookie.js"

@@ -12,0 +12,0 @@ /**

@@ -1,5 +0,5 @@

import { OAuthCallbackError } from "../errors"
import { useNonce } from "./nonce-handler"
import { usePKCECodeVerifier } from "./pkce-handler"
import { useState } from "./state-handler"
import { OAuthCallbackError } from "../errors.js"
import { useNonce } from "./nonce-handler.js"
import { usePKCECodeVerifier } from "./pkce-handler.js"
import { useState } from "./state-handler.js"
import * as o from "oauth4webapi"

@@ -13,5 +13,5 @@

TokenSet,
} from "../.."
import type { OAuthConfigInternal } from "../../providers"
import type { Cookie } from "../cookie"
} from "../../index.js"
import type { OAuthConfigInternal } from "../../providers/index.js"
import type { Cookie } from "../cookie.js"

@@ -18,0 +18,0 @@ export async function handleOAuthCallback(params: {

import * as o from "oauth4webapi"
import * as jwt from "../../jwt"
import * as jwt from "../../jwt/index.js"
import type { InternalOptions } from "../.."
import type { Cookie } from "../cookie"
import type { InternalOptions } from "../../index.js"
import type { Cookie } from "../cookie.js"

@@ -7,0 +7,0 @@ const NONCE_MAX_AGE = 60 * 15 // 15 minutes in seconds

import * as o from "oauth4webapi"
import * as jwt from "../../jwt"
import * as jwt from "../../jwt/index.js"
import type { InternalOptions } from "../.."
import type { Cookie } from "../cookie"
import type { InternalOptions } from "../../index.js"
import type { Cookie } from "../cookie.js"

@@ -7,0 +7,0 @@ const PKCE_CODE_CHALLENGE_METHOD = "S256"

@@ -1,3 +0,3 @@

import type { InternalOptions } from "../.."
import type { Cookie } from "../cookie"
import type { InternalOptions } from "../../index.js"
import type { Cookie } from "../cookie.js"
import * as o from "oauth4webapi"

@@ -4,0 +4,0 @@

@@ -1,11 +0,15 @@

import renderToString from "preact-render-to-string"
import css from "../styles"
import ErrorPage from "./error"
import SigninPage from "./signin"
import SignoutPage from "./signout"
import VerifyRequestPage from "./verify-request"
import { renderToString } from "preact-render-to-string"
import css from "../styles/index.js"
import ErrorPage from "./error.js"
import SigninPage from "./signin.js"
import SignoutPage from "./signout.js"
import VerifyRequestPage from "./verify-request.js"
import type { InternalOptions, RequestInternal, ResponseInternal } from "../.."
import type { Cookie } from "../cookie"
import type { ErrorType } from "./error"
import type {
InternalOptions,
RequestInternal,
ResponseInternal,
} from "../../index.js"
import type { Cookie } from "../cookie.js"
import type { ErrorType } from "./error.js"

@@ -12,0 +16,0 @@ type RenderPageParams = {

@@ -1,4 +0,4 @@

import { merge } from "./utils/merge"
import { merge } from "./utils/merge.js"
import type { InternalProvider } from ".."
import type { InternalProvider } from "../index.js"
import type {

@@ -10,3 +10,3 @@ OAuthConfig,

Provider,
} from "../providers"
} from "../providers/index.js"

@@ -13,0 +13,0 @@ /**

@@ -1,10 +0,10 @@

import callbackHandler from "../callback-handler"
import getAdapterUserFromEmail from "../email/getUserFromEmail"
import { handleOAuthCallback } from "../oauth/callback"
import { createHash } from "../web"
import callbackHandler from "../callback-handler.js"
import getAdapterUserFromEmail from "../email/getUserFromEmail.js"
import { handleOAuthCallback } from "../oauth/callback.js"
import { createHash } from "../web.js"
import type { RequestInternal, ResponseInternal, User } from "../.."
import type { AdapterSession } from "../../adapters"
import type { Cookie, SessionStore } from "../cookie"
import type { InternalOptions } from "../types"
import type { RequestInternal, ResponseInternal, User } from "../../index.js"
import type { AdapterSession } from "../../adapters.js"
import type { Cookie, SessionStore } from "../cookie.js"
import type { InternalOptions } from "../types.js"

@@ -11,0 +11,0 @@ /** Handle callbacks from login services */

@@ -1,5 +0,5 @@

export { callback } from "./callback"
export { providers } from "./providers"
export { session } from "./session"
export { signin } from "./signin"
export { signout } from "./signout"
export { callback } from "./callback.js"
export { providers } from "./providers.js"
export { session } from "./session.js"
export { signin } from "./signin.js"
export { signout } from "./signout.js"

@@ -1,2 +0,2 @@

import type { InternalProvider, ResponseInternal } from "../.."
import type { InternalProvider, ResponseInternal } from "../../index.js"

@@ -3,0 +3,0 @@ export interface PublicProvider {

@@ -1,6 +0,6 @@

import { fromDate } from "../utils/date"
import { fromDate } from "../utils/date.js"
import type { InternalOptions, ResponseInternal, Session } from "../.."
import type { Adapter } from "../../adapters"
import type { SessionStore } from "../cookie"
import type { InternalOptions, ResponseInternal, Session } from "../../index.js"
import type { Adapter } from "../../adapters.js"
import type { SessionStore } from "../cookie.js"

@@ -7,0 +7,0 @@ interface SessionParams {

@@ -1,4 +0,4 @@

import getAdapterUserFromEmail from "../email/getUserFromEmail"
import emailSignin from "../email/signin"
import { getAuthorizationUrl } from "../oauth/authorization-url"
import getAdapterUserFromEmail from "../email/getUserFromEmail.js"
import emailSignin from "../email/signin.js"
import { getAuthorizationUrl } from "../oauth/authorization-url.js"

@@ -10,3 +10,3 @@ import type {

ResponseInternal,
} from "../.."
} from "../../index.js"

@@ -13,0 +13,0 @@ /** Handle requests to /api/auth/signin */

@@ -1,4 +0,4 @@

import type { InternalOptions, ResponseInternal } from "../.."
import type { Adapter } from "../../adapters"
import type { SessionStore } from "../cookie"
import type { InternalOptions, ResponseInternal } from "../../index.js"
import type { Adapter } from "../../adapters.js"
import type { SessionStore } from "../cookie.js"

@@ -5,0 +5,0 @@ /** Handle requests to /api/auth/signout */

import type { CookieSerializeOptions } from "cookie"
import type { Adapter, AdapterUser } from "../adapters"
import type { Adapter, AdapterUser } from "../adapters.js"
import type {

@@ -10,3 +10,3 @@ CredentialInput,

ProviderType,
} from "../providers"
} from "../providers/index.js"
import type {

@@ -16,7 +16,6 @@ OAuth2TokenEndpointResponse,

} from "oauth4webapi"
import type { JWT, JWTOptions } from "../jwt"
import type { Cookie } from "./cookie"
import type { LoggerInstance } from "./utils/logger"
import type { JWT, JWTOptions } from "../jwt/types.js"
import type { Cookie } from "./cookie.js"
import type { LoggerInstance } from "./utils/logger.js"
/** @internal */
export type Awaitable<T> = T | PromiseLike<T>

@@ -23,0 +22,0 @@

@@ -1,2 +0,2 @@

import { UnknownError } from "../errors"
import { UnknownError } from "../errors.js"

@@ -3,0 +3,0 @@ /** Makes sure that error is always serializable */

import { parse as parseCookie, serialize } from "cookie"
import type { RequestInternal, ResponseInternal } from ".."
import { UnknownAction } from "./errors"
import type { AuthAction } from "./types"
import type { RequestInternal, ResponseInternal } from "../index.js"
import { UnknownAction } from "./errors.js"
import type { AuthAction } from "./types.js"

@@ -6,0 +6,0 @@ async function getBody(req: Request): Promise<Record<string, any> | undefined> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface UserData {

@@ -1,2 +0,2 @@

import { OAuthConfig, OAuthUserConfig } from "."
import { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ interface AtlassianProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface Auth0Profile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface AuthentikProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface AzureB2CProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface AzureADProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface BattleNetProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface BoxyHQSAMLProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface CognitoProfile extends Record<string, any> {

@@ -1,3 +0,3 @@

import type { CommonProviderOptions } from "."
import type { Awaitable, RequestInternal, User } from ".."
import type { CommonProviderOptions } from "./index.js"
import type { Awaitable, RequestInternal, User } from "../index.js"

@@ -4,0 +4,0 @@ export interface CredentialInput {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface DiscordProfile extends Record<string, any> {

import { createTransport } from "nodemailer"
import type { CommonProviderOptions } from "."
import type { CommonProviderOptions } from "./index.js"
import type { Options as SMTPTransportOptions } from "nodemailer/lib/smtp-transport"
import type { Awaitable, Theme } from ".."
import type { Awaitable, Theme } from "../index.js"

@@ -7,0 +7,0 @@ export interface SendVerificationRequestParams {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -20,3 +20,4 @@ export interface EVEOnlineProfile extends Record<string, any> {

type: "oauth",
authorization: "https://login.eveonline.com/v2/oauth/authorize?scope=publicData",
authorization:
"https://login.eveonline.com/v2/oauth/authorize?scope=publicData",
token: "https://login.eveonline.com/v2/oauth/token",

@@ -23,0 +24,0 @@ userinfo: "https://login.eveonline.com/oauth/verify",

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ interface FacebookPictureData {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ /** @see https://docs.github.com/en/rest/users/users#get-the-authenticated-user */

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface GitLabProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface GoogleProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ interface HubSpotProfile extends Record<string, any> {

@@ -1,3 +0,3 @@

import type { OAuthConfig, OAuthProvider, OAuthProviderType } from "./oauth"
import type { EmailConfig, EmailProvider, EmailProviderType } from "./email"
import type { OAuthConfig, OAuthProvider, OAuthProviderType } from "./oauth.js"
import type { EmailConfig, EmailProvider, EmailProviderType } from "./email.js"
import type {

@@ -7,7 +7,7 @@ CredentialsConfig,

CredentialsProviderType,
} from "./credentials"
} from "./credentials.js"
export * from "./credentials"
export * from "./email"
export * from "./oauth"
export * from "./credentials.js"
export * from "./email.js"
export * from "./oauth.js"

@@ -14,0 +14,0 @@ export type ProviderType = "oidc" | "oauth" | "email" | "credentials"

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export type DateTime = string

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface KeycloakProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface LineProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ interface Identifier {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ /** https://developers.naver.com/docs/login/profile/profile.md */

@@ -1,3 +0,3 @@

import type { CommonProviderOptions } from "../providers"
import type { Profile, TokenSet, User, Awaitable } from ".."
import type { CommonProviderOptions } from "../providers/index.js"
import type { Profile, TokenSet, User, Awaitable } from "../index.js"
import type { Client } from "oauth4webapi"

@@ -12,3 +12,3 @@

export type { OAuthProviderType } from "./oauth-types"
export type { OAuthProviderType } from "./oauth-types.js"

@@ -101,2 +101,13 @@ type ChecksType = "pkce" | "state" | "none" | "nonce"

/**
* Identifies the provider when you want to sign in to
* a specific provider.
* @example
* ```js
* signIn('github') // "github" is the provider ID
* ```
*/
id: string
/** The name of the provider. shown on the default sign in page. */
name: string
/**
* OpenID Connect (OIDC) compliant providers can configure

@@ -103,0 +114,0 @@ * this instead of `authorize`/`token`/`userinfo` options

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface OktaProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface OsuUserCompact {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface PatreonProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import { OAuthConfig, OAuthUserConfig } from "."
import { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface PinterestProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface PipedriveProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface SalesforceProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface SlackProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface SpotifyImage {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface StravaProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface TraktUser extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface TwitchProfile extends Record<string, any> {

// TODO: move OAuth 1.0 support or remove it?
import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -4,0 +4,0 @@ export interface TwitterLegacyProfile {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface UnitedEffectsProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface VkProfile {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export type WikimediaGroup =

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface WorkOSProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OIDCConfig, OAuthUserConfig } from "."
import type { OIDCConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface ZitadelProfile extends Record<string, any> {

@@ -1,2 +0,2 @@

import type { OAuthConfig, OAuthUserConfig } from "."
import type { OAuthConfig, OAuthUserConfig } from "./index.js"

@@ -3,0 +3,0 @@ export interface ZoomProfile extends Record<string, any> {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc