import { Prompt } from '../consts/index.js'; import type { FirstScreen, InteractionMode } from '../types/index.js'; export type DirectSignInOptions = { /** * The method to be used for the direct sign-in. */ method: 'social' | 'sso'; /** * The target to be used for the direct sign-in. * * - For `method: 'social'`, it should be the social connector target. */ target: string; }; type Identifier = 'email' | 'phone' | 'username'; export type SignInUriParameters = { authorizationEndpoint: string; clientId: string; redirectUri: string; codeChallenge: string; state: string; scopes?: string[]; resources?: string[]; prompt?: Prompt | Prompt[]; /** * The first screen to be shown in the sign-in experience. */ firstScreen?: FirstScreen; /** * Specifies identifiers used in the identifier sign-in, identifier register, and reset password pages. * * Available values: `email`, `phone`, `username`. * * This parameter is applicable only when the `firstScreen` is set to either `identifierSignIn` or `identifierRegister`. * * If the provided identifier is not supported in the Logto sign-in experience configuration, it will be ignored, * and if no one of them is supported, it will fallback to the sign-in / sign-up method value set in the sign-in experience configuration. * */ identifiers?: Identifier[]; /** * The first screen to be shown in the sign-in experience. * * @deprecated Use `firstScreen` instead. */ interactionMode?: InteractionMode; /** * Login hint indicates the current user (usually an email address or a phone number). */ loginHint?: string; /** * One-time token for the sign-in request. * * @experimental This might change in future development. Please use with caution. */ oneTimeToken?: string; /** * Parameters for direct sign-in. * * @see {@link https://docs.logto.io/docs/references/openid-connect/authentication-parameters/#direct-sign-in Direct sign-in} for more information. */ directSignIn?: DirectSignInOptions; /** * Extra parameters for the authentication request. Note that the parameters should be supported * by the authorization server. */ extraParams?: Record; /** * Whether to include reserved scopes (`openid`, `offline_access` and `profile`) in the scopes. * * @default true */ includeReservedScopes?: boolean; }; export declare const generateSignInUri: ({ authorizationEndpoint, clientId, redirectUri, codeChallenge, state, scopes, resources, prompt, firstScreen, identifiers: identifier, interactionMode, loginHint, directSignIn, oneTimeToken, extraParams, includeReservedScopes, }: SignInUriParameters) => string; export {};