@leancodepl/kratos 8.3.6 → 8.5.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.
Files changed (80) hide show
  1. package/README.md +368 -4
  2. package/package.json +43 -7
  3. package/index.cjs.d.ts +0 -1
  4. package/index.cjs.default.js +0 -1
  5. package/index.cjs.js +0 -4362
  6. package/index.cjs.mjs +0 -2
  7. package/index.esm.d.ts +0 -1
  8. package/index.esm.js +0 -4334
  9. package/src/index.d.ts +0 -12
  10. package/src/lib/cards/index.d.ts +0 -2
  11. package/src/lib/cards/userAuthCard.d.ts +0 -20
  12. package/src/lib/cards/userSettingsCard.d.ts +0 -10
  13. package/src/lib/createKratosClient.d.ts +0 -2
  14. package/src/lib/defaultComponents/DefaultButtonComponent/index.d.ts +0 -2
  15. package/src/lib/defaultComponents/DefaultCheckboxComponent/index.d.ts +0 -2
  16. package/src/lib/defaultComponents/DefaultImageComponent/index.d.ts +0 -2
  17. package/src/lib/defaultComponents/DefaultInputComponent/index.d.ts +0 -2
  18. package/src/lib/defaultComponents/DefaultLinkComponent/index.d.ts +0 -2
  19. package/src/lib/defaultComponents/DefaultMessageComponent/index.d.ts +0 -2
  20. package/src/lib/defaultComponents/DefaultMessageFormatComponent/index.d.ts +0 -2
  21. package/src/lib/defaultComponents/DefaultTextComponent/index.d.ts +0 -2
  22. package/src/lib/defaultComponents/DefaultUiMessagesComponent/index.d.ts +0 -2
  23. package/src/lib/defaultComponents.d.ts +0 -2
  24. package/src/lib/flows/index.d.ts +0 -7
  25. package/src/lib/flows/useLoginFlow.d.ts +0 -21
  26. package/src/lib/flows/useLogoutFlow.d.ts +0 -8
  27. package/src/lib/flows/useReauthenticationFlow.d.ts +0 -8
  28. package/src/lib/flows/useRecoveryFlow.d.ts +0 -20
  29. package/src/lib/flows/useRegistrationFlow.d.ts +0 -20
  30. package/src/lib/flows/useSettingsFlow.d.ts +0 -20
  31. package/src/lib/flows/useVerificationFlow.d.ts +0 -20
  32. package/src/lib/helpers/errorMessages.d.ts +0 -7
  33. package/src/lib/helpers/filterFlowNodes.d.ts +0 -7
  34. package/src/lib/helpers/formattedMessage.d.ts +0 -4
  35. package/src/lib/helpers/getNodeLabel.d.ts +0 -2
  36. package/src/lib/helpers/node.d.ts +0 -7
  37. package/src/lib/helpers/useScriptNodes.d.ts +0 -5
  38. package/src/lib/helpers/userAuthForm.d.ts +0 -31
  39. package/src/lib/kratosContext.d.ts +0 -11
  40. package/src/lib/kratosContextProvider.d.ts +0 -10
  41. package/src/lib/sections/authCodeSection.d.ts +0 -14
  42. package/src/lib/sections/identifierFirstLoginSection.d.ts +0 -8
  43. package/src/lib/sections/linkSection.d.ts +0 -14
  44. package/src/lib/sections/loginSection.d.ts +0 -8
  45. package/src/lib/sections/lookupSecretSettingsSection.d.ts +0 -8
  46. package/src/lib/sections/oidcSection.d.ts +0 -8
  47. package/src/lib/sections/oidcSettingsSection.d.ts +0 -8
  48. package/src/lib/sections/passkeySettingsSection.d.ts +0 -8
  49. package/src/lib/sections/passwordSettingsSection.d.ts +0 -8
  50. package/src/lib/sections/passwordlessSection.d.ts +0 -8
  51. package/src/lib/sections/profileLoginSection.d.ts +0 -8
  52. package/src/lib/sections/profileRegistrationSection.d.ts +0 -8
  53. package/src/lib/sections/profileSettingsSection.d.ts +0 -8
  54. package/src/lib/sections/registrationSection.d.ts +0 -8
  55. package/src/lib/sections/totpSettingsSection.d.ts +0 -8
  56. package/src/lib/sessionManager/baseSessionManager.d.ts +0 -13
  57. package/src/lib/types/components.d.ts +0 -78
  58. package/src/lib/types/enums/errorId.d.ts +0 -16
  59. package/src/lib/types/enums/errorValidation.d.ts +0 -30
  60. package/src/lib/types/enums/errorValidationLogin.d.ts +0 -9
  61. package/src/lib/types/enums/errorValidationRecovery.d.ts +0 -9
  62. package/src/lib/types/enums/errorValidationRegistration.d.ts +0 -4
  63. package/src/lib/types/enums/errorValidationSettings.d.ts +0 -4
  64. package/src/lib/types/enums/errorValidationVerification.d.ts +0 -9
  65. package/src/lib/types/enums/index.d.ts +0 -14
  66. package/src/lib/types/enums/infoNodeLabel.d.ts +0 -14
  67. package/src/lib/types/enums/infoSelfServiceLogin.d.ts +0 -16
  68. package/src/lib/types/enums/infoSelfServiceRecovery.d.ts +0 -6
  69. package/src/lib/types/enums/infoSelfServiceRegistration.d.ts +0 -7
  70. package/src/lib/types/enums/infoSelfServiceSettings.d.ts +0 -21
  71. package/src/lib/types/enums/infoSelfServiceVerification.d.ts +0 -6
  72. package/src/lib/types/enums/misc.d.ts +0 -10
  73. package/src/lib/types/responseError.d.ts +0 -2
  74. package/src/lib/types/useHandleFlowError.d.ts +0 -13
  75. package/src/lib/utils/filterNodesByGroups.d.ts +0 -22
  76. package/src/lib/utils/getNodeInputType.d.ts +0 -1
  77. package/src/lib/utils/handleCancelError.d.ts +0 -2
  78. package/src/lib/utils/helpers.d.ts +0 -11
  79. package/src/lib/utils/typeGuards.d.ts +0 -24
  80. package/src/lib/utils/variables.d.ts +0 -4
package/src/index.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export * from "./lib/createKratosClient";
2
- export * from "./lib/kratosContext";
3
- export * from "./lib/kratosContextProvider";
4
- export * from "./lib/utils/variables";
5
- export * from "./lib/types/responseError";
6
- export * from "./lib/types/useHandleFlowError";
7
- export * from "./lib/sessionManager/baseSessionManager";
8
- export * from "./lib/types/enums";
9
- export * from "./lib/types/components";
10
- export * from "./lib/utils/typeGuards";
11
- export * from "./lib/flows";
12
- export * from "./lib/cards";
@@ -1,2 +0,0 @@
1
- export * from "./userAuthCard";
2
- export * from "./userSettingsCard";
@@ -1,20 +0,0 @@
1
- import { LoginFlow, RecoveryFlow, RegistrationFlow, UpdateLoginFlowBody, UpdateRecoveryFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, VerificationFlow } from "@ory/client";
2
- import { UserAuthFormAdditionalProps } from "../helpers/userAuthForm";
3
- type UserAuthCardProps<TBody> = {
4
- className?: string;
5
- flow: LoginFlow | RecoveryFlow | RegistrationFlow | VerificationFlow;
6
- flowType: "login" | "recovery" | "registration" | "verification";
7
- } & UserAuthFormAdditionalProps<TBody>;
8
- export declare const LoginCard: ({ ...props }: {
9
- flow: LoginFlow;
10
- } & Omit<UserAuthCardProps<UpdateLoginFlowBody>, "flow" | "flowType">) => import("react/jsx-runtime").JSX.Element;
11
- export declare const VerificationCard: ({ ...props }: {
12
- flow: VerificationFlow;
13
- } & Omit<UserAuthCardProps<UpdateVerificationFlowBody>, "flow" | "flowType">) => import("react/jsx-runtime").JSX.Element;
14
- export declare const RegistrationCard: ({ ...props }: {
15
- flow: RegistrationFlow;
16
- } & Omit<UserAuthCardProps<UpdateRegistrationFlowBody>, "flow" | "flowType">) => import("react/jsx-runtime").JSX.Element;
17
- export declare const RecoveryCard: ({ ...props }: {
18
- flow: RecoveryFlow;
19
- } & Omit<UserAuthCardProps<UpdateRecoveryFlowBody>, "flow" | "flowType">) => import("react/jsx-runtime").JSX.Element;
20
- export {};
@@ -1,10 +0,0 @@
1
- import { JSX } from "react";
2
- import { SettingsFlow, UiNodeGroupEnum, UpdateSettingsFlowBody } from "@ory/client";
3
- import { UserAuthFormAdditionalProps } from "../helpers/userAuthForm";
4
- export type UserSettingsFlowType = typeof UiNodeGroupEnum.LookupSecret | typeof UiNodeGroupEnum.Oidc | typeof UiNodeGroupEnum.Passkey | typeof UiNodeGroupEnum.Password | typeof UiNodeGroupEnum.Profile | typeof UiNodeGroupEnum.Totp;
5
- export type UserSettingsCardProps = {
6
- flow: SettingsFlow;
7
- flowType: UserSettingsFlowType;
8
- className?: string;
9
- } & UserAuthFormAdditionalProps<UpdateSettingsFlowBody>;
10
- export declare function UserSettingsCard({ flow, flowType, onSubmit, className }: UserSettingsCardProps): JSX.Element | null;
@@ -1,2 +0,0 @@
1
- import { ConfigurationParameters, FrontendApi } from "@ory/client";
2
- export declare function createKratosClient(configuration: ConfigurationParameters): FrontendApi;
@@ -1,2 +0,0 @@
1
- import type { ButtonComponentProps } from "../../types/components";
2
- export declare function DefaultButtonComponent({ header, ...props }: ButtonComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { CheckboxComponentProps } from "../../types/components";
2
- export declare function DefaultCheckboxComponent({ label, helperMessage, ...props }: CheckboxComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { ImageComponentProps } from "../../types/components";
2
- export declare function DefaultImageComponent({ header, ...props }: ImageComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { InputComponentProps } from "../../types/components";
2
- export declare function DefaultInputComponent({ helperMessage, header, ...props }: InputComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { LinkComponentProps } from "../../types/components";
2
- export declare function DefaultLinkComponent({ href: _href, ...props }: LinkComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { MessageComponentProps } from "../../types/components";
2
- export declare function DefaultMessageComponent({ children }: MessageComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { MessageFormatComponentProps } from "../../types/components";
2
- export declare function DefaultMessageFormatComponent({ text }: MessageFormatComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { TextComponentProps } from "../../types/components";
2
- export declare function DefaultTextComponent({ label, codes }: TextComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { UiMessagesComponentProps } from "../../types/components";
2
- export declare function DefaultUiMessagesComponent(props: UiMessagesComponentProps): import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import type { KratosComponents } from "./types/components";
2
- export declare const defaultComponents: KratosComponents;
@@ -1,7 +0,0 @@
1
- export * from "./useReauthenticationFlow";
2
- export * from "./useRecoveryFlow";
3
- export * from "./useSettingsFlow";
4
- export * from "./useLoginFlow";
5
- export * from "./useRegistrationFlow";
6
- export * from "./useVerificationFlow";
7
- export * from "./useLogoutFlow";
@@ -1,21 +0,0 @@
1
- import { FrontendApi, LoginFlow, Session, UpdateLoginFlowBody } from "@ory/client";
2
- import { aalParameterName, flowIdParameterName, refreshParameterName, returnToParameterName } from "../utils/variables";
3
- export type LoginSearchParams = {
4
- [flowIdParameterName]?: string;
5
- [returnToParameterName]?: string;
6
- [refreshParameterName]?: string;
7
- [aalParameterName]?: string;
8
- };
9
- export declare function useLoginFlow({ kratosClient, returnTo, onLoggedIn, onSessionAlreadyAvailable, searchParams, updateSearchParams, }: {
10
- kratosClient: FrontendApi;
11
- returnTo?: string;
12
- onLoggedIn?: (session: Session) => void;
13
- onSessionAlreadyAvailable?: () => void;
14
- updateSearchParams: (searchParams: LoginSearchParams) => void;
15
- searchParams?: LoginSearchParams;
16
- }): {
17
- flow: LoginFlow | undefined;
18
- submit: ({ body }: {
19
- body: UpdateLoginFlowBody;
20
- }) => void;
21
- };
@@ -1,8 +0,0 @@
1
- import { FrontendApi } from "@ory/client";
2
- export declare function useLogoutFlow({ kratosClient, returnTo, onLoggedOut, }: {
3
- kratosClient: FrontendApi;
4
- returnTo?: string;
5
- onLoggedOut?: () => void;
6
- }): {
7
- logout: () => Promise<void>;
8
- };
@@ -1,8 +0,0 @@
1
- import { FrontendApi, LoginFlow, Session, UpdateLoginFlowBody } from "@ory/client";
2
- export declare function useReauthenticationFlow({ kratosClient, onReauthenticated, }: {
3
- kratosClient: FrontendApi;
4
- onReauthenticated: (session: Session) => void;
5
- }): {
6
- flow: LoginFlow | undefined;
7
- submit: (values: UpdateLoginFlowBody) => Promise<unknown> | undefined;
8
- };
@@ -1,20 +0,0 @@
1
- import { ContinueWith, FrontendApi, RecoveryFlow, UpdateRecoveryFlowBody } from "@ory/client";
2
- import { flowIdParameterName, returnToParameterName } from "../utils/variables";
3
- type RecoveryFlowSearchParams = {
4
- [flowIdParameterName]?: string;
5
- [returnToParameterName]?: string;
6
- };
7
- export declare function useRecoveryFlow({ kratosClient, onSessionAlreadyAvailable, onContinueWith, searchParams, updateSearchParams, }: {
8
- kratosClient: FrontendApi;
9
- onSessionAlreadyAvailable: () => void;
10
- onContinueWith?: (continueWith: ContinueWith[]) => void;
11
- searchParams?: RecoveryFlowSearchParams;
12
- updateSearchParams: (searchParams: RecoveryFlowSearchParams) => void;
13
- }): {
14
- flow: RecoveryFlow | undefined;
15
- submit: ({ body }: {
16
- body: UpdateRecoveryFlowBody;
17
- }) => Promise<unknown> | undefined;
18
- isRecovering: boolean;
19
- };
20
- export {};
@@ -1,20 +0,0 @@
1
- import { ContinueWith, FrontendApi, RegistrationFlow, UpdateRegistrationFlowBody } from "@ory/client";
2
- import { flowIdParameterName, returnToParameterName } from "../utils/variables";
3
- type RegistrationFlowSearchParams = {
4
- [flowIdParameterName]?: string;
5
- [returnToParameterName]?: string;
6
- };
7
- export declare function useRegisterFlow({ kratosClient, onSessionAlreadyAvailable, onContinueWith, searchParams, updateSearchParams, }: {
8
- kratosClient: FrontendApi;
9
- onSessionAlreadyAvailable: () => void;
10
- onContinueWith?: (continueWith: ContinueWith[]) => void;
11
- searchParams?: RegistrationFlowSearchParams;
12
- updateSearchParams: (searchParams: RegistrationFlowSearchParams) => void;
13
- }): {
14
- flow: RegistrationFlow | undefined;
15
- submit: ({ body }: {
16
- body: UpdateRegistrationFlowBody;
17
- }) => Promise<unknown> | undefined;
18
- isRegistered: boolean;
19
- };
20
- export {};
@@ -1,20 +0,0 @@
1
- import { ContinueWith, FrontendApi, SettingsFlow, UpdateSettingsFlowBody } from "@ory/client";
2
- import { AxiosRequestConfig } from "axios";
3
- import { flowIdParameterName, returnToParameterName } from "../utils/variables";
4
- type SettingsFlowSearchParams = {
5
- [flowIdParameterName]?: string;
6
- [returnToParameterName]?: string;
7
- };
8
- export declare function useSettingsFlow({ kratosClient, params, onContinueWith, searchParams, updateSearchParams, }: {
9
- kratosClient: FrontendApi;
10
- params?: AxiosRequestConfig["params"];
11
- onContinueWith?: (continueWith: ContinueWith[]) => void;
12
- searchParams?: SettingsFlowSearchParams;
13
- updateSearchParams: (searchParams: SettingsFlowSearchParams) => void;
14
- }): {
15
- flow: SettingsFlow | undefined;
16
- submit: ({ body }: {
17
- body: UpdateSettingsFlowBody;
18
- }) => Promise<unknown> | undefined;
19
- };
20
- export {};
@@ -1,20 +0,0 @@
1
- import { FrontendApi, UpdateVerificationFlowBody, VerificationFlow } from "@ory/client";
2
- import { flowIdParameterName, returnToParameterName } from "../utils/variables";
3
- type RecoveryFlowSearchParams = {
4
- [flowIdParameterName]?: string;
5
- [returnToParameterName]?: string;
6
- };
7
- export declare function useVerificationFlow({ initialFlowId, kratosClient, onVerified, searchParams, updateSearchParams, }: {
8
- initialFlowId?: string;
9
- kratosClient: FrontendApi;
10
- onVerified: () => void;
11
- searchParams?: RecoveryFlowSearchParams;
12
- updateSearchParams: (searchParams: RecoveryFlowSearchParams) => void;
13
- }): {
14
- flow: VerificationFlow | undefined;
15
- submit: ({ body }: {
16
- body: UpdateVerificationFlowBody;
17
- }) => Promise<unknown> | undefined;
18
- reset: () => void;
19
- };
20
- export {};
@@ -1,7 +0,0 @@
1
- import { UiNode, UiText } from "@ory/client";
2
- type NodeMessagesProps = {
3
- nodes?: UiNode[];
4
- uiMessages?: UiText[];
5
- };
6
- export declare function NodeMessages({ nodes, uiMessages }: NodeMessagesProps): import("react/jsx-runtime").JSX.Element | null;
7
- export {};
@@ -1,7 +0,0 @@
1
- import { FilterNodesByGroups } from "../utils/filterNodesByGroups";
2
- type FilterFlowNodesProps = {
3
- filter: FilterNodesByGroups;
4
- includeCSRF?: boolean;
5
- };
6
- export declare function FilterFlowNodes({ filter, includeCSRF, ...overrides }: FilterFlowNodesProps): import("react/jsx-runtime").JSX.Element | null;
7
- export {};
@@ -1,4 +0,0 @@
1
- import { UiText } from "@ory/client";
2
- export declare function FormattedMessage({ message }: {
3
- message?: Omit<UiText, "type">;
4
- }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,2 +0,0 @@
1
- import { UiNode, UiText } from "@ory/client";
2
- export declare const getNodeLabel: (node: UiNode) => UiText | undefined;
@@ -1,7 +0,0 @@
1
- import { UiNode } from "@ory/client";
2
- type NodeProps = {
3
- node: UiNode;
4
- className?: string;
5
- };
6
- export declare function Node({ node, className }: NodeProps): import("react/jsx-runtime").JSX.Element | null;
7
- export {};
@@ -1,5 +0,0 @@
1
- import { UiNode } from "@ory/client";
2
- export declare function useScriptNodes({ nodes, excludeScripts }: {
3
- nodes: UiNode[];
4
- excludeScripts?: boolean;
5
- }): void;
@@ -1,31 +0,0 @@
1
- import { ReactNode } from "react";
2
- import { LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow } from "@ory/client";
3
- import { FilterNodesByGroups } from "../utils/filterNodesByGroups";
4
- export type SelfServiceFlow = LoginFlow | RecoveryFlow | RegistrationFlow | SettingsFlow | VerificationFlow;
5
- /**
6
- * Additional props that can be passed to the UserAuthForm component
7
- * @see UserAuthForm
8
- *
9
- * @param onSubmit - function that is called when the form is submitted. It automatically maps the form data to the request body and prevents native form submits.
10
- */
11
- export type UserAuthFormAdditionalProps<TBody> = {
12
- onSubmit?: ({ body, event }: {
13
- body: TBody;
14
- event?: React.FormEvent<HTMLFormElement>;
15
- }) => void;
16
- };
17
- export type UserAuthFormProps<TBody> = {
18
- flow: SelfServiceFlow;
19
- children: ReactNode;
20
- formFilterOverride?: FilterNodesByGroups;
21
- submitOnEnter?: boolean;
22
- className?: string;
23
- } & Omit<React.FormHTMLAttributes<HTMLFormElement>, "onSubmit"> & UserAuthFormAdditionalProps<TBody>;
24
- /**
25
- * UserAuthForm is a component that renders a form for a given Ory flow.
26
- * It automatically adds the form action and method and adds csrf tokens to the form.
27
- * When the `onSubmit` parameter is passed, it also automatically maps the form data to the request body and prevents native form submits.
28
- * @see UserAuthFormProps
29
- * @returns JSX.Element
30
- */
31
- export declare function UserAuthForm<TBody>({ flow, children, submitOnEnter, onSubmit, formFilterOverride, ...props }: UserAuthFormProps<TBody>): import("react/jsx-runtime").JSX.Element;
@@ -1,11 +0,0 @@
1
- import type { KratosComponents } from "./types/components";
2
- import type { UseHandleFlowError } from "./types/useHandleFlowError";
3
- export type KratosContextData = {
4
- components: KratosComponents | undefined;
5
- useHandleFlowError: UseHandleFlowError;
6
- excludeScripts: boolean;
7
- };
8
- export declare const kratosContext: import("react").Context<KratosContextData>;
9
- export declare function useKratosContext(): {
10
- components: KratosComponents;
11
- } & KratosContextData;
@@ -1,10 +0,0 @@
1
- import { ReactNode } from "react";
2
- import type { KratosComponents } from "./types/components";
3
- import type { UseHandleFlowError } from "./types/useHandleFlowError";
4
- export type KratosContextProviderProps = {
5
- components?: Partial<KratosComponents>;
6
- useHandleFlowError?: UseHandleFlowError;
7
- excludeScripts?: boolean;
8
- children?: ReactNode;
9
- };
10
- export declare function KratosContextProvider({ components, useHandleFlowError, excludeScripts, children, }: KratosContextProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- import { ElementType } from "react";
2
- import { UiNode } from "@ory/client";
3
- type AuthCodeSectionProps = {
4
- nodes: UiNode[];
5
- AuthCodeSectionWrapper: ElementType;
6
- };
7
- /**
8
- * AuthCodeSection renders the fields for login and registration via one-time code.
9
- * Please see the Ory docs for more information: https://www.ory.sh/docs/kratos/passwordless/one-time-code
10
- * @param nodes - Ory UiNode[]
11
- * @see AuthCodeSectionProps
12
- */
13
- export declare function AuthCodeSection({ nodes, AuthCodeSectionWrapper }: AuthCodeSectionProps): import("react/jsx-runtime").JSX.Element | null;
14
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { UiNode } from "@ory/client";
3
- type IdentifierFirstLoginSectionProps = {
4
- nodes: UiNode[];
5
- IdentifierFirstLoginSectionWrapper: ElementType;
6
- };
7
- export declare function IdentifierFirstLoginSection({ nodes, IdentifierFirstLoginSectionWrapper, }: IdentifierFirstLoginSectionProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,14 +0,0 @@
1
- import { ElementType } from "react";
2
- import { UiNode } from "@ory/client";
3
- type LinkSectionProps = {
4
- nodes: UiNode[];
5
- LinkSectionWrapper: ElementType;
6
- };
7
- /**
8
- * LinkSection renders the fields for recovery and verification
9
- * Please see the Ory docs for more information:
10
- * - https://www.ory.sh/docs/kratos/self-service/flows/account-recovery-password-reset
11
- * - https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation
12
- */
13
- export declare function LinkSection({ nodes, LinkSectionWrapper }: LinkSectionProps): import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { UiNode } from "@ory/client";
3
- type LoginSectionProps = {
4
- nodes: UiNode[];
5
- LoginSectionWrapper: ElementType;
6
- };
7
- export declare function LoginSection({ nodes, LoginSectionWrapper }: LoginSectionProps): import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { SettingsFlow } from "@ory/client";
3
- type LookupSecretSettingsProps = {
4
- flow: SettingsFlow;
5
- LookupSecretSettingsSectionWrapper: ElementType;
6
- };
7
- export declare function LookupSecretSettingsSection({ flow, LookupSecretSettingsSectionWrapper }: LookupSecretSettingsProps): import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { SelfServiceFlow } from "../helpers/userAuthForm";
3
- type OidcSectionProps = {
4
- flow: SelfServiceFlow;
5
- OidcSectionWrapper: ElementType;
6
- };
7
- export declare function OidcSection({ flow, OidcSectionWrapper }: OidcSectionProps): import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { SettingsFlow } from "@ory/client";
3
- type OidcSettingsProps = {
4
- flow: SettingsFlow;
5
- OidcSettingsSectionWrapper: ElementType;
6
- };
7
- export declare function OidcSettingsSection({ flow, OidcSettingsSectionWrapper }: OidcSettingsProps): import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { SettingsFlow } from "@ory/client";
3
- type WebAuthnSettingsProps = {
4
- flow: SettingsFlow;
5
- PasskeySettingsSectionWrapper: ElementType;
6
- };
7
- export declare function PasskeySettingsSection({ flow, PasskeySettingsSectionWrapper }: WebAuthnSettingsProps): import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { SettingsFlow } from "@ory/client";
3
- type PasswordSettingsProps = {
4
- flow: SettingsFlow;
5
- PasswordSettingsSectionWrapper: ElementType;
6
- };
7
- export declare function PasswordSettingsSection({ flow, PasswordSettingsSectionWrapper }: PasswordSettingsProps): import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { SelfServiceFlow } from "../helpers/userAuthForm";
3
- type PasswordlessSectionProps = {
4
- flow: SelfServiceFlow;
5
- PasswordlessSectionWrapper: ElementType;
6
- };
7
- export declare function PasswordlessSection({ flow, PasswordlessSectionWrapper }: PasswordlessSectionProps): import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { UiNode } from "@ory/client";
3
- type ProfileLoginSectionProps = {
4
- nodes: UiNode[];
5
- ProfileLoginSectionWrapper: ElementType;
6
- };
7
- export declare function ProfileLoginSection({ nodes, ProfileLoginSectionWrapper }: ProfileLoginSectionProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { UiNode } from "@ory/client";
3
- type ProfileRegistrationSectionProps = {
4
- nodes: UiNode[];
5
- ProfileRegistrationSectionWrapper: ElementType;
6
- };
7
- export declare function ProfileRegistrationSection({ nodes, ProfileRegistrationSectionWrapper, }: ProfileRegistrationSectionProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { SettingsFlow } from "@ory/client";
3
- type ProfileSettingsProps = {
4
- flow: SettingsFlow;
5
- ProfileSettingsSectionWrapper: ElementType;
6
- };
7
- export declare function ProfileSettingsSection({ flow, ProfileSettingsSectionWrapper }: ProfileSettingsProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { UiNode } from "@ory/client";
3
- type RegistrationSectionProps = {
4
- nodes: UiNode[];
5
- RegistrationSectionWrapper: ElementType;
6
- };
7
- export declare function RegistrationSection({ nodes, RegistrationSectionWrapper }: RegistrationSectionProps): import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,8 +0,0 @@
1
- import { ElementType } from "react";
2
- import { SettingsFlow } from "@ory/client";
3
- type TotpSettingsProps = {
4
- flow: SettingsFlow;
5
- TotpSettingsSectionWrapper: ElementType;
6
- };
7
- export declare function TotpSettingsSection({ flow, TotpSettingsSectionWrapper }: TotpSettingsProps): import("react/jsx-runtime").JSX.Element | null;
8
- export {};
@@ -1,13 +0,0 @@
1
- import { Session } from "@ory/client";
2
- import { Subject } from "rxjs";
3
- export declare class BaseSessionManager {
4
- authUrl: string;
5
- loginRoute: string;
6
- session$: Subject<Session | undefined>;
7
- isLoggedIn: import("rxjs").Observable<boolean>;
8
- identity$: import("rxjs").Observable<import("@ory/client").Identity | undefined>;
9
- userId$: import("rxjs").Observable<string | undefined>;
10
- setSession(session: Session | undefined): void;
11
- checkIfLoggedIn: () => void;
12
- constructor(authUrl: string, loginRoute: string);
13
- }
@@ -1,78 +0,0 @@
1
- import { ComponentType, ElementType, ReactNode } from "react";
2
- import { UiNode, UiNodeTextAttributes, UiText, UiTextTypeEnum } from "@ory/client";
3
- type Node = {
4
- node: UiNode;
5
- };
6
- export type ImageComponentProps = {
7
- header?: ReactNode;
8
- className?: string;
9
- } & Node & React.ImgHTMLAttributes<HTMLImageElement>;
10
- export type TextComponentProps = {
11
- label?: ReactNode;
12
- id: string;
13
- codes?: UiText[];
14
- attributes: UiNodeTextAttributes;
15
- } & Node;
16
- export type LinkComponentProps = {
17
- children?: ReactNode;
18
- href?: string;
19
- icon?: string;
20
- className?: string;
21
- } & Node & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "href">;
22
- export type InputComponentProps = {
23
- header: ReactNode;
24
- helperMessage?: ReactNode;
25
- isError?: boolean;
26
- } & Node & React.InputHTMLAttributes<HTMLInputElement>;
27
- export type MessageComponentProps = {
28
- message: UiText;
29
- key: string;
30
- severity: Severity;
31
- children?: ReactNode;
32
- };
33
- export type Severity = "default" | "disabled" | UiTextTypeEnum;
34
- export type ButtonComponentProps = {
35
- header?: ReactNode;
36
- fullWidth?: boolean;
37
- social?: string;
38
- } & Node & React.ButtonHTMLAttributes<HTMLButtonElement>;
39
- export type CheckboxComponentProps = {
40
- label?: ReactNode;
41
- helperMessage?: ReactNode;
42
- isError?: boolean;
43
- } & Node & React.InputHTMLAttributes<HTMLInputElement>;
44
- export type MessageFormatComponentProps = {
45
- id: number;
46
- text: string;
47
- context?: object;
48
- };
49
- export type UiMessagesComponentProps = {
50
- uiMessages?: UiText[];
51
- };
52
- export type KratosComponents = {
53
- MessageFormat: ComponentType<MessageFormatComponentProps>;
54
- Image: ComponentType<ImageComponentProps>;
55
- Text: ComponentType<TextComponentProps>;
56
- Link: ComponentType<LinkComponentProps>;
57
- Input: ComponentType<InputComponentProps>;
58
- Message: ComponentType<MessageComponentProps>;
59
- Button: ComponentType<ButtonComponentProps>;
60
- Checkbox: ComponentType<CheckboxComponentProps>;
61
- UiMessages: ComponentType<UiMessagesComponentProps>;
62
- OidcSectionWrapper: ElementType;
63
- PasswordlessSectionWrapper: ElementType;
64
- AuthCodeSectionWrapper: ElementType;
65
- LoginSectionWrapper: ElementType;
66
- RegistrationSectionWrapper: ElementType;
67
- LinkSectionWrapper: ElementType;
68
- ProfileSettingsSectionWrapper: ElementType;
69
- PasswordSettingsSectionWrapper: ElementType;
70
- WebAuthnSettingsSectionWrapper: ElementType;
71
- LookupSecretSettingsSectionWrapper: ElementType;
72
- OidcSettingsSectionWrapper: ElementType;
73
- TotpSettingsSectionWrapper: ElementType;
74
- IdentifierFirstLoginSectionWrapper: ElementType;
75
- ProfileLoginSectionWrapper: ElementType;
76
- ProfileRegistrationSectionWrapper: ElementType;
77
- };
78
- export {};
@@ -1,16 +0,0 @@
1
- export declare enum ErrorId {
2
- ErrIDNeedsPrivilegedSession = "session_refresh_required",
3
- ErrIDSelfServiceFlowExpired = "self_service_flow_expired",
4
- ErrIDSelfServiceFlowDisabled = "self_service_flow_disabled",
5
- ErrIDSelfServiceBrowserLocationChangeRequiredError = "browser_location_change_required",
6
- ErrIDSelfServiceFlowReplaced = "self_service_flow_replaced",
7
- ErrIDAlreadyLoggedIn = "session_already_available",
8
- ErrIDAddressNotVerified = "session_verified_address_required",
9
- ErrIDSessionHasAALAlready = "session_aal_already_fulfilled",
10
- ErrIDSessionRequiredForHigherAAL = "session_aal1_required",
11
- ErrIDHigherAALRequired = "session_aal2_required",
12
- ErrNoActiveSession = "session_inactive",
13
- ErrIDRedirectURLNotAllowed = "self_service_flow_return_to_forbidden",
14
- ErrIDInitiatedBySomeoneElse = "security_identity_mismatch",
15
- ErrIDCSRF = "security_csrf_violation"
16
- }