@userfront/react
Advanced tools
+36
-79
@@ -1,34 +0,46 @@ | ||
| import * as _userfront_core from '@userfront/core'; | ||
| import * as React from 'react'; | ||
| import Userfront from '@userfront/toolkit/react'; | ||
| import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
| import * as react from 'react'; | ||
| import { ComponentProps, ReactNode } from 'react'; | ||
| import Userfront, { SignupForm as SignupForm$1, LoginForm as LoginForm$1, PasswordResetForm as PasswordResetForm$1, LogoutButton as LogoutButton$1 } from '@userfront/toolkit/react'; | ||
| /** | ||
| * React wrappers for Userfront toolkit components | ||
| */ | ||
| interface ToolkitProps { | ||
| compact?: boolean; | ||
| } | ||
| /** | ||
| * Signup Form | ||
| */ | ||
| type SignupFormProps = ToolkitProps; | ||
| declare const SignupForm: React.ForwardRefExoticComponent<ToolkitProps & React.RefAttributes<unknown>>; | ||
| type SignupFormProps = ComponentProps<typeof SignupForm$1>; | ||
| declare const SignupForm: react.ForwardRefExoticComponent<{ | ||
| tenantId?: string | undefined; | ||
| flow?: object | undefined; | ||
| compact?: boolean | undefined; | ||
| theme?: object | undefined; | ||
| } & react.RefAttributes<never>>; | ||
| /** | ||
| * Login Form | ||
| */ | ||
| type LoginFormProps = ToolkitProps; | ||
| declare const LoginForm: React.ForwardRefExoticComponent<ToolkitProps & React.RefAttributes<unknown>>; | ||
| type LoginFormProps = ComponentProps<typeof LoginForm$1>; | ||
| declare const LoginForm: react.ForwardRefExoticComponent<{ | ||
| tenantId?: string | undefined; | ||
| flow?: object | undefined; | ||
| compact?: boolean | undefined; | ||
| theme?: object | undefined; | ||
| } & react.RefAttributes<never>>; | ||
| /** | ||
| * Password Reset Form | ||
| */ | ||
| type PasswordResetFormProps = ToolkitProps; | ||
| declare const PasswordResetForm: React.ForwardRefExoticComponent<ToolkitProps & React.RefAttributes<unknown>>; | ||
| type PasswordResetFormProps = ComponentProps<typeof PasswordResetForm$1>; | ||
| declare const PasswordResetForm: react.ForwardRefExoticComponent<{ | ||
| tenantId?: string | undefined; | ||
| theme?: object | undefined; | ||
| } & react.RefAttributes<never>>; | ||
| /** | ||
| * Password Reset Form | ||
| */ | ||
| type LogoutButtonProps = ToolkitProps; | ||
| declare const LogoutButton: React.ForwardRefExoticComponent<ToolkitProps & React.RefAttributes<unknown>>; | ||
| type LogoutButtonProps = ComponentProps<typeof LogoutButton$1>; | ||
| declare const LogoutButton: react.ForwardRefExoticComponent<{ | ||
| disabled?: boolean | undefined; | ||
| theme?: object | undefined; | ||
| } & react.RefAttributes<never>>; | ||
| interface UserfrontOptions { | ||
| type UserfrontInstance = Required<typeof Userfront>; | ||
| interface UserfrontProviderProps { | ||
| children?: ReactNode; | ||
| /** | ||
@@ -41,3 +53,3 @@ * Tenant ID from Userfront (**required**) | ||
| */ | ||
| skeleton?: React.ReactNode | null; | ||
| skeleton?: ReactNode | null; | ||
| /** | ||
@@ -77,64 +89,9 @@ * Redirect URL for unauthenticated visitors that need to login | ||
| } | ||
| declare function useUserfront({ tenantId, skeleton, loginUrl, loginRedirect, signupRedirect, logoutRedirect, requireAuth, baseUrl, }: UserfrontOptions): { | ||
| init: typeof Userfront.init; | ||
| addInitCallback: typeof Userfront.addInitCallback; | ||
| signup: typeof Userfront.signup; | ||
| login: typeof Userfront.login; | ||
| logout: typeof Userfront.logout; | ||
| getSession: typeof Userfront.getSession; | ||
| redirectIfLoggedIn: typeof Userfront.redirectIfLoggedIn; | ||
| redirectIfLoggedOut: typeof Userfront.redirectIfLoggedOut; | ||
| updatePassword: typeof Userfront.updatePassword; | ||
| resetPassword: typeof Userfront.resetPassword; | ||
| sendLoginLink: typeof Userfront.sendLoginLink; | ||
| sendResetLink: typeof Userfront.sendResetLink; | ||
| sendVerificationCode: typeof Userfront.sendVerificationCode; | ||
| user: Userfront.User; | ||
| tokens: Userfront.Tokens; | ||
| mode: Userfront.Mode; | ||
| tenantId: string; | ||
| type UserfrontContextType = UserfrontInstance & Omit<UserfrontProviderProps, "children"> & { | ||
| isAuthenticated: boolean; | ||
| isLoading: boolean; | ||
| skeleton: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null; | ||
| loginUrl: string; | ||
| loginRedirect: string | boolean | undefined; | ||
| signupRedirect: string | boolean | undefined; | ||
| logoutRedirect: string | boolean | undefined; | ||
| requireAuth: boolean; | ||
| }; | ||
| declare function UserfrontProvider({ baseUrl, children, loginRedirect, loginUrl, logoutRedirect, requireAuth, signupRedirect, skeleton, tenantId, }: UserfrontProviderProps): react_jsx_runtime.JSX.Element; | ||
| declare function useUserfront(): UserfrontContextType; | ||
| type UserfrontHookArgs = Parameters<typeof useUserfront>[0]; | ||
| type UserfrontContextType = ReturnType<typeof useUserfront>; | ||
| interface UserfrontProviderProps extends UserfrontHookArgs { | ||
| children?: React.ReactNode; | ||
| } | ||
| declare function UserfrontProvider({ children, ...props }: UserfrontProviderProps): React.JSX.Element; | ||
| declare function useUserfrontContext(): { | ||
| init: typeof _userfront_core.init; | ||
| addInitCallback: typeof _userfront_core.addInitCallback; | ||
| signup: typeof _userfront_core.signup; | ||
| login: typeof _userfront_core.login; | ||
| logout: typeof _userfront_core.logout; | ||
| getSession: typeof _userfront_core.getSession; | ||
| redirectIfLoggedIn: typeof _userfront_core.redirectIfLoggedIn; | ||
| redirectIfLoggedOut: typeof _userfront_core.redirectIfLoggedOut; | ||
| updatePassword: typeof _userfront_core.updatePassword; | ||
| resetPassword: typeof _userfront_core.resetPassword; | ||
| sendLoginLink: typeof _userfront_core.sendLoginLink; | ||
| sendResetLink: typeof _userfront_core.sendResetLink; | ||
| sendVerificationCode: typeof _userfront_core.sendVerificationCode; | ||
| user: _userfront_core.User; | ||
| tokens: _userfront_core.Tokens; | ||
| mode: _userfront_core.Mode; | ||
| tenantId: string; | ||
| isAuthenticated: boolean; | ||
| isLoading: boolean; | ||
| skeleton: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null; | ||
| loginUrl: string; | ||
| loginRedirect: string | boolean | undefined; | ||
| signupRedirect: string | boolean | undefined; | ||
| logoutRedirect: string | boolean | undefined; | ||
| requireAuth: boolean; | ||
| }; | ||
| export { LoginForm, type LoginFormProps, LogoutButton, type LogoutButtonProps, PasswordResetForm, type PasswordResetFormProps, SignupForm, type SignupFormProps, type ToolkitProps, type UserfrontContextType, UserfrontProvider, type UserfrontProviderProps, useUserfrontContext as useUserfront }; | ||
| export { LoginForm, type LoginFormProps, LogoutButton, type LogoutButtonProps, PasswordResetForm, type PasswordResetFormProps, SignupForm, type SignupFormProps, type UserfrontContextType, type UserfrontInstance, UserfrontProvider, type UserfrontProviderProps, useUserfront }; |
+36
-79
@@ -1,34 +0,46 @@ | ||
| import * as _userfront_core from '@userfront/core'; | ||
| import * as React from 'react'; | ||
| import Userfront from '@userfront/toolkit/react'; | ||
| import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
| import * as react from 'react'; | ||
| import { ComponentProps, ReactNode } from 'react'; | ||
| import Userfront, { SignupForm as SignupForm$1, LoginForm as LoginForm$1, PasswordResetForm as PasswordResetForm$1, LogoutButton as LogoutButton$1 } from '@userfront/toolkit/react'; | ||
| /** | ||
| * React wrappers for Userfront toolkit components | ||
| */ | ||
| interface ToolkitProps { | ||
| compact?: boolean; | ||
| } | ||
| /** | ||
| * Signup Form | ||
| */ | ||
| type SignupFormProps = ToolkitProps; | ||
| declare const SignupForm: React.ForwardRefExoticComponent<ToolkitProps & React.RefAttributes<unknown>>; | ||
| type SignupFormProps = ComponentProps<typeof SignupForm$1>; | ||
| declare const SignupForm: react.ForwardRefExoticComponent<{ | ||
| tenantId?: string | undefined; | ||
| flow?: object | undefined; | ||
| compact?: boolean | undefined; | ||
| theme?: object | undefined; | ||
| } & react.RefAttributes<never>>; | ||
| /** | ||
| * Login Form | ||
| */ | ||
| type LoginFormProps = ToolkitProps; | ||
| declare const LoginForm: React.ForwardRefExoticComponent<ToolkitProps & React.RefAttributes<unknown>>; | ||
| type LoginFormProps = ComponentProps<typeof LoginForm$1>; | ||
| declare const LoginForm: react.ForwardRefExoticComponent<{ | ||
| tenantId?: string | undefined; | ||
| flow?: object | undefined; | ||
| compact?: boolean | undefined; | ||
| theme?: object | undefined; | ||
| } & react.RefAttributes<never>>; | ||
| /** | ||
| * Password Reset Form | ||
| */ | ||
| type PasswordResetFormProps = ToolkitProps; | ||
| declare const PasswordResetForm: React.ForwardRefExoticComponent<ToolkitProps & React.RefAttributes<unknown>>; | ||
| type PasswordResetFormProps = ComponentProps<typeof PasswordResetForm$1>; | ||
| declare const PasswordResetForm: react.ForwardRefExoticComponent<{ | ||
| tenantId?: string | undefined; | ||
| theme?: object | undefined; | ||
| } & react.RefAttributes<never>>; | ||
| /** | ||
| * Password Reset Form | ||
| */ | ||
| type LogoutButtonProps = ToolkitProps; | ||
| declare const LogoutButton: React.ForwardRefExoticComponent<ToolkitProps & React.RefAttributes<unknown>>; | ||
| type LogoutButtonProps = ComponentProps<typeof LogoutButton$1>; | ||
| declare const LogoutButton: react.ForwardRefExoticComponent<{ | ||
| disabled?: boolean | undefined; | ||
| theme?: object | undefined; | ||
| } & react.RefAttributes<never>>; | ||
| interface UserfrontOptions { | ||
| type UserfrontInstance = Required<typeof Userfront>; | ||
| interface UserfrontProviderProps { | ||
| children?: ReactNode; | ||
| /** | ||
@@ -41,3 +53,3 @@ * Tenant ID from Userfront (**required**) | ||
| */ | ||
| skeleton?: React.ReactNode | null; | ||
| skeleton?: ReactNode | null; | ||
| /** | ||
@@ -77,64 +89,9 @@ * Redirect URL for unauthenticated visitors that need to login | ||
| } | ||
| declare function useUserfront({ tenantId, skeleton, loginUrl, loginRedirect, signupRedirect, logoutRedirect, requireAuth, baseUrl, }: UserfrontOptions): { | ||
| init: typeof Userfront.init; | ||
| addInitCallback: typeof Userfront.addInitCallback; | ||
| signup: typeof Userfront.signup; | ||
| login: typeof Userfront.login; | ||
| logout: typeof Userfront.logout; | ||
| getSession: typeof Userfront.getSession; | ||
| redirectIfLoggedIn: typeof Userfront.redirectIfLoggedIn; | ||
| redirectIfLoggedOut: typeof Userfront.redirectIfLoggedOut; | ||
| updatePassword: typeof Userfront.updatePassword; | ||
| resetPassword: typeof Userfront.resetPassword; | ||
| sendLoginLink: typeof Userfront.sendLoginLink; | ||
| sendResetLink: typeof Userfront.sendResetLink; | ||
| sendVerificationCode: typeof Userfront.sendVerificationCode; | ||
| user: Userfront.User; | ||
| tokens: Userfront.Tokens; | ||
| mode: Userfront.Mode; | ||
| tenantId: string; | ||
| type UserfrontContextType = UserfrontInstance & Omit<UserfrontProviderProps, "children"> & { | ||
| isAuthenticated: boolean; | ||
| isLoading: boolean; | ||
| skeleton: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null; | ||
| loginUrl: string; | ||
| loginRedirect: string | boolean | undefined; | ||
| signupRedirect: string | boolean | undefined; | ||
| logoutRedirect: string | boolean | undefined; | ||
| requireAuth: boolean; | ||
| }; | ||
| declare function UserfrontProvider({ baseUrl, children, loginRedirect, loginUrl, logoutRedirect, requireAuth, signupRedirect, skeleton, tenantId, }: UserfrontProviderProps): react_jsx_runtime.JSX.Element; | ||
| declare function useUserfront(): UserfrontContextType; | ||
| type UserfrontHookArgs = Parameters<typeof useUserfront>[0]; | ||
| type UserfrontContextType = ReturnType<typeof useUserfront>; | ||
| interface UserfrontProviderProps extends UserfrontHookArgs { | ||
| children?: React.ReactNode; | ||
| } | ||
| declare function UserfrontProvider({ children, ...props }: UserfrontProviderProps): React.JSX.Element; | ||
| declare function useUserfrontContext(): { | ||
| init: typeof _userfront_core.init; | ||
| addInitCallback: typeof _userfront_core.addInitCallback; | ||
| signup: typeof _userfront_core.signup; | ||
| login: typeof _userfront_core.login; | ||
| logout: typeof _userfront_core.logout; | ||
| getSession: typeof _userfront_core.getSession; | ||
| redirectIfLoggedIn: typeof _userfront_core.redirectIfLoggedIn; | ||
| redirectIfLoggedOut: typeof _userfront_core.redirectIfLoggedOut; | ||
| updatePassword: typeof _userfront_core.updatePassword; | ||
| resetPassword: typeof _userfront_core.resetPassword; | ||
| sendLoginLink: typeof _userfront_core.sendLoginLink; | ||
| sendResetLink: typeof _userfront_core.sendResetLink; | ||
| sendVerificationCode: typeof _userfront_core.sendVerificationCode; | ||
| user: _userfront_core.User; | ||
| tokens: _userfront_core.Tokens; | ||
| mode: _userfront_core.Mode; | ||
| tenantId: string; | ||
| isAuthenticated: boolean; | ||
| isLoading: boolean; | ||
| skeleton: string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | null; | ||
| loginUrl: string; | ||
| loginRedirect: string | boolean | undefined; | ||
| signupRedirect: string | boolean | undefined; | ||
| logoutRedirect: string | boolean | undefined; | ||
| requireAuth: boolean; | ||
| }; | ||
| export { LoginForm, type LoginFormProps, LogoutButton, type LogoutButtonProps, PasswordResetForm, type PasswordResetFormProps, SignupForm, type SignupFormProps, type ToolkitProps, type UserfrontContextType, UserfrontProvider, type UserfrontProviderProps, useUserfrontContext as useUserfront }; | ||
| export { LoginForm, type LoginFormProps, LogoutButton, type LogoutButtonProps, PasswordResetForm, type PasswordResetFormProps, SignupForm, type SignupFormProps, type UserfrontContextType, type UserfrontInstance, UserfrontProvider, type UserfrontProviderProps, useUserfront }; |
+11
-11
| { | ||
| "name": "@userfront/react", | ||
| "version": "2.0.1", | ||
| "version": "2.0.2-canary.1", | ||
| "description": "Transform your React application with Userfront authentication", | ||
@@ -38,18 +38,18 @@ "repository": { | ||
| "@types/react-dom": "18.3.0", | ||
| "@userfront/core": "0.6.8", | ||
| "@userfront/toolkit": "1.0.9", | ||
| "@vitejs/plugin-react": "4.2.1", | ||
| "axios": "1.6.8", | ||
| "@vitejs/plugin-react": "4.3.4", | ||
| "axios": "1.8.3", | ||
| "eslint": "9.2.0", | ||
| "happy-dom": "15.10.2", | ||
| "react-use": "17.5.1", | ||
| "tsup": "8.0.2", | ||
| "tsup": "8.4.0", | ||
| "type-fest": "4.18.2", | ||
| "typescript": "5.4.5", | ||
| "vitest": "1.6.0", | ||
| "@userfront/tsconfig": "0.0.0" | ||
| "typescript": "5.8.2", | ||
| "vitest": "3.0.8", | ||
| "@userfront/toolkit": "1.0.11-canary.1", | ||
| "tsconfig": "0.0.0", | ||
| "@userfront/core": "1.1.1-canary.1" | ||
| }, | ||
| "peerDependencies": { | ||
| "react": "^18", | ||
| "react-dom": "^18" | ||
| "react": "18 || 19", | ||
| "react-dom": "18 || 19" | ||
| }, | ||
@@ -56,0 +56,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
876241
4.18%3548
1.75%95
-4.04%4
33.33%22
69.23%