@vaadin/hilla-react-auth 24.7.0-alpha10 → 24.7.0-alpha11
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.
- package/index.js +1 -1
- package/package.json +2 -2
- package/useAuth.d.ts +2 -2
- package/useAuth.d.ts.map +1 -1
- package/useAuth.js.map +1 -1
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@ function __REGISTER__(feature, vaadinObj = window.Vaadin ??= {}) {
|
|
|
2
2
|
vaadinObj.registrations ??= [];
|
|
3
3
|
vaadinObj.registrations.push({
|
|
4
4
|
is: feature ? `${"@vaadin/hilla-react-auth"}/${feature}` : "@vaadin/hilla-react-auth",
|
|
5
|
-
version: "24.7.0-
|
|
5
|
+
version: "24.7.0-alpha11"
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
8
|
export * from "./ProtectedRoute.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/hilla-react-auth",
|
|
3
|
-
"version": "24.7.0-
|
|
3
|
+
"version": "24.7.0-alpha11",
|
|
4
4
|
"description": "Hilla auth utils for React",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vaadin/hilla-frontend": "24.7.0-
|
|
49
|
+
"@vaadin/hilla-frontend": "24.7.0-alpha11"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": "18 || 19",
|
package/useAuth.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type LoginResult } from '@vaadin/hilla-frontend';
|
|
2
|
-
type LoginFunction = (username: string, password: string) => Promise<LoginResult>;
|
|
1
|
+
import { type LoginOptions, type LoginResult } from '@vaadin/hilla-frontend';
|
|
2
|
+
type LoginFunction = (username: string, password: string, options?: LoginOptions) => Promise<LoginResult>;
|
|
3
3
|
type LogoutFunction = () => Promise<void>;
|
|
4
4
|
/**
|
|
5
5
|
* The type of the function that is used to get the authenticated user.
|
package/useAuth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["src/useAuth.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["src/useAuth.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAIjB,MAAM,wBAAwB,CAAC;AAGhC,KAAK,aAAa,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;AAC1G,KAAK,cAAc,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AAO1C;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,KAAK,IAAI,MAAM,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;AAEhE,KAAK,SAAS,CAAC,KAAK,IAAI,QAAQ,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;CACzC,CAAC,CAAC;AAyFH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IACjC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;CAC/C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,KAAK,IAAI,QAAQ,CAAC;IAC3C,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IACxB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,SAAS,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC;CAC9C,CAAC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,WAAW;;sBAjIR,OAAO;iBACZ,OAAO;;gBAER,MAAM;;;WAqHP,aAAa;YACZ,cAAc;2BACC,WAAW,GAAG,OAAO;GAkB5C,CAAC;AAEH,UAAU,UAAU,CAAC,KAAK;IACxB,QAAQ,CAAC,CAAC,IAAI,EAAE,KAAK,GAAG,SAAS,MAAM,EAAE,CAAC;CAC3C;AAsED,MAAM,MAAM,QAAQ,CAAC,KAAK,IAAI,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;AAW1D,UAAU,UAAU,CAAC,KAAK;IACxB,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAChD,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;CAC1B;AAED,wBAAgB,aAAa,CAAC,KAAK,EACjC,oBAAoB,EAAE,SAAS,CAAC,KAAK,CAAC,EACtC,MAAM,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,GACzB,UAAU,CAAC,KAAK,CAAC,CAanB"}
|
package/useAuth.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["src/useAuth.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n login as _login,\n type LoginOptions,\n type LoginResult,\n logout as _logout,\n type LogoutOptions,\n UnauthorizedResponseError,\n} from '@vaadin/hilla-frontend';\nimport { createContext, type Dispatch, useContext, useEffect, useReducer } from 'react';\n\ntype LoginFunction = (username: string, password: string) => Promise<LoginResult>;\ntype LogoutFunction = () => Promise<void>;\n\nconst LOGIN_FETCH = 'LOGIN_FETCH';\nconst LOGIN_SUCCESS = 'LOGIN_SUCCESS';\nconst LOGIN_FAILURE = 'LOGIN_FAILURE';\nconst LOGOUT = 'LOGOUT';\n\n/**\n * The type of the function that is used to get the authenticated user.\n */\nexport type GetUserFn<TUser> = () => Promise<TUser | undefined>;\n\ntype AuthState<TUser> = Readonly<{\n initializing: boolean;\n loading: boolean;\n user?: TUser;\n error?: string;\n getAuthenticatedUser?: GetUserFn<TUser>;\n}>;\n\ntype LoginFetchAction = Readonly<{\n type: typeof LOGIN_FETCH;\n}>;\n\ntype LoginSuccessAction = Readonly<{\n user: unknown;\n type: typeof LOGIN_SUCCESS;\n}>;\n\ntype LoginFailureAction = Readonly<{\n error: string;\n type: typeof LOGIN_FAILURE;\n}>;\n\ntype LoginActions = LoginFailureAction | LoginFetchAction | LoginSuccessAction;\n\ntype LogoutAction = Readonly<{\n type: typeof LOGOUT;\n}>;\n\nfunction createAuthenticateThunk<TUser>(dispatch: Dispatch<LoginActions>, getAuthenticatedUser: GetUserFn<TUser>) {\n async function authenticate() {\n dispatch({ type: LOGIN_FETCH });\n\n // Get user info from endpoint\n const user = await getAuthenticatedUser().catch((error: unknown) => {\n if (error instanceof UnauthorizedResponseError) {\n // 401 response: the user is not authenticated\n return undefined;\n }\n\n throw error;\n });\n\n if (user) {\n dispatch({\n user,\n type: LOGIN_SUCCESS,\n });\n } else {\n dispatch({\n error: 'Not authenticated',\n type: LOGIN_FAILURE,\n });\n }\n }\n\n return authenticate;\n}\n\nfunction createUnauthenticateThunk(dispatch: Dispatch<LogoutAction>) {\n return () => {\n dispatch({ type: LOGOUT });\n };\n}\n\nconst initialState: AuthState<unknown> = {\n initializing: true,\n loading: false,\n};\n\nfunction reducer(state: AuthState<unknown>, action: LoginActions | LogoutAction) {\n switch (action.type) {\n case LOGIN_FETCH:\n return {\n initializing: false,\n loading: true,\n };\n case LOGIN_SUCCESS:\n return {\n initializing: false,\n loading: false,\n user: action.user,\n };\n case LOGIN_FAILURE:\n return {\n initializing: false,\n loading: false,\n error: action.error,\n };\n case LOGOUT:\n return { initializing: false, loading: false };\n default:\n return state;\n }\n}\n\n/**\n * The properties that can be used to control access to a route.\n * They can be added to the route type handler as properties.\n */\nexport type AccessProps = Readonly<{\n /**\n * If true, the user must be logged in to access the route.\n */\n loginRequired?: boolean;\n /**\n * If true, the user must be logged in to access the route.\n *\n * @deprecated Use `loginRequired` instead.\n */\n requiresLogin?: boolean;\n /**\n * The list of roles that are allowed to access the route.\n */\n rolesAllowed?: readonly [string, ...string[]];\n}>;\n\n/**\n * The type of the authentication hook.\n */\nexport type Authentication<TUser> = Readonly<{\n state: AuthState<TUser>;\n login: LoginFunction;\n logout: LogoutFunction;\n hasAccess(accessProps: AccessProps): boolean;\n}>;\n\n/**\n * The hook that can be used to get the authentication state.\n * It returns the state of the authentication.\n */\nexport const AuthContext = createContext<Authentication<unknown>>({\n state: initialState,\n login() {\n throw new Error('AuthContext not initialized');\n },\n logout() {\n throw new Error('AuthContext not initialized');\n },\n hasAccess(): boolean {\n throw new Error('AuthContext not initialized');\n },\n});\n\ninterface AuthConfig<TUser> {\n getRoles?(user: TUser): readonly string[];\n}\n\ninterface AuthProviderProps<TUser> extends React.PropsWithChildren {\n getAuthenticatedUser: GetUserFn<TUser>;\n config?: AuthConfig<TUser>;\n}\n\ninterface UserWithRoles {\n roles?: any;\n}\n\nconst getDefaultRoles = (user: unknown) => {\n const userWithRoles = user as UserWithRoles;\n return Array.isArray(userWithRoles.roles) ? userWithRoles.roles : [];\n};\n\nfunction AuthProvider<TUser>({ children, getAuthenticatedUser, config }: AuthProviderProps<TUser>) {\n const [state, dispatch] = useReducer(reducer, initialState);\n const authenticate = createAuthenticateThunk(dispatch, getAuthenticatedUser);\n const unauthenticate = createUnauthenticateThunk(dispatch);\n\n async function login(username: string, password: string, options?: LoginOptions): Promise<LoginResult> {\n const result = await _login(username, password, options);\n\n if (!result.error) {\n await authenticate();\n }\n\n return result;\n }\n\n async function logout(options?: LogoutOptions): Promise<void> {\n await _logout(options);\n unauthenticate();\n }\n\n function hasAccess({ loginRequired, requiresLogin, rolesAllowed }: AccessProps): boolean {\n const requiresAuth = loginRequired ?? requiresLogin ?? rolesAllowed;\n if (!requiresAuth) {\n return true;\n }\n\n if (!state.user) {\n return false;\n }\n\n if (rolesAllowed) {\n const userRoles = config?.getRoles ? config.getRoles(state.user as TUser) : getDefaultRoles(state.user);\n return rolesAllowed.some((allowedRole) => userRoles.includes(allowedRole));\n }\n\n return true;\n }\n\n useEffect(() => {\n authenticate().catch(() => {\n // Do nothing\n });\n }, []);\n\n const auth = {\n state,\n login,\n logout,\n hasAccess,\n };\n\n return <AuthContext.Provider value={auth}>{children}</AuthContext.Provider>;\n}\n\nexport type AuthHook<TUser> = () => Authentication<TUser>;\n\n/**\n * The hook that can be used to authenticate the user.\n * It returns the state of the authentication and the functions\n * to authenticate and unauthenticate the user.\n */\nfunction useAuth<TUser>(): Authentication<TUser> {\n return useContext(AuthContext) as Authentication<TUser>;\n}\n\ninterface AuthModule<TUser> {\n AuthProvider: React.FC<React.PropsWithChildren>;\n useAuth: AuthHook<TUser>;\n}\n\nexport function configureAuth<TUser>(\n getAuthenticatedUser: GetUserFn<TUser>,\n config?: AuthConfig<TUser>,\n): AuthModule<TUser> {\n function PreconfiguredAuthProvider({ children }: React.PropsWithChildren) {\n return (\n <AuthProvider<TUser> getAuthenticatedUser={getAuthenticatedUser} config={config}>\n {children}\n </AuthProvider>\n );\n }\n\n return {\n AuthProvider: PreconfiguredAuthProvider,\n useAuth: useAuth as AuthHook<TUser>,\n };\n}\n"],
|
|
4
|
+
"sourcesContent": ["import {\n login as _login,\n type LoginOptions,\n type LoginResult,\n logout as _logout,\n type LogoutOptions,\n UnauthorizedResponseError,\n} from '@vaadin/hilla-frontend';\nimport { createContext, type Dispatch, useContext, useEffect, useReducer } from 'react';\n\ntype LoginFunction = (username: string, password: string, options?: LoginOptions) => Promise<LoginResult>;\ntype LogoutFunction = () => Promise<void>;\n\nconst LOGIN_FETCH = 'LOGIN_FETCH';\nconst LOGIN_SUCCESS = 'LOGIN_SUCCESS';\nconst LOGIN_FAILURE = 'LOGIN_FAILURE';\nconst LOGOUT = 'LOGOUT';\n\n/**\n * The type of the function that is used to get the authenticated user.\n */\nexport type GetUserFn<TUser> = () => Promise<TUser | undefined>;\n\ntype AuthState<TUser> = Readonly<{\n initializing: boolean;\n loading: boolean;\n user?: TUser;\n error?: string;\n getAuthenticatedUser?: GetUserFn<TUser>;\n}>;\n\ntype LoginFetchAction = Readonly<{\n type: typeof LOGIN_FETCH;\n}>;\n\ntype LoginSuccessAction = Readonly<{\n user: unknown;\n type: typeof LOGIN_SUCCESS;\n}>;\n\ntype LoginFailureAction = Readonly<{\n error: string;\n type: typeof LOGIN_FAILURE;\n}>;\n\ntype LoginActions = LoginFailureAction | LoginFetchAction | LoginSuccessAction;\n\ntype LogoutAction = Readonly<{\n type: typeof LOGOUT;\n}>;\n\nfunction createAuthenticateThunk<TUser>(dispatch: Dispatch<LoginActions>, getAuthenticatedUser: GetUserFn<TUser>) {\n async function authenticate() {\n dispatch({ type: LOGIN_FETCH });\n\n // Get user info from endpoint\n const user = await getAuthenticatedUser().catch((error: unknown) => {\n if (error instanceof UnauthorizedResponseError) {\n // 401 response: the user is not authenticated\n return undefined;\n }\n\n throw error;\n });\n\n if (user) {\n dispatch({\n user,\n type: LOGIN_SUCCESS,\n });\n } else {\n dispatch({\n error: 'Not authenticated',\n type: LOGIN_FAILURE,\n });\n }\n }\n\n return authenticate;\n}\n\nfunction createUnauthenticateThunk(dispatch: Dispatch<LogoutAction>) {\n return () => {\n dispatch({ type: LOGOUT });\n };\n}\n\nconst initialState: AuthState<unknown> = {\n initializing: true,\n loading: false,\n};\n\nfunction reducer(state: AuthState<unknown>, action: LoginActions | LogoutAction) {\n switch (action.type) {\n case LOGIN_FETCH:\n return {\n initializing: false,\n loading: true,\n };\n case LOGIN_SUCCESS:\n return {\n initializing: false,\n loading: false,\n user: action.user,\n };\n case LOGIN_FAILURE:\n return {\n initializing: false,\n loading: false,\n error: action.error,\n };\n case LOGOUT:\n return { initializing: false, loading: false };\n default:\n return state;\n }\n}\n\n/**\n * The properties that can be used to control access to a route.\n * They can be added to the route type handler as properties.\n */\nexport type AccessProps = Readonly<{\n /**\n * If true, the user must be logged in to access the route.\n */\n loginRequired?: boolean;\n /**\n * If true, the user must be logged in to access the route.\n *\n * @deprecated Use `loginRequired` instead.\n */\n requiresLogin?: boolean;\n /**\n * The list of roles that are allowed to access the route.\n */\n rolesAllowed?: readonly [string, ...string[]];\n}>;\n\n/**\n * The type of the authentication hook.\n */\nexport type Authentication<TUser> = Readonly<{\n state: AuthState<TUser>;\n login: LoginFunction;\n logout: LogoutFunction;\n hasAccess(accessProps: AccessProps): boolean;\n}>;\n\n/**\n * The hook that can be used to get the authentication state.\n * It returns the state of the authentication.\n */\nexport const AuthContext = createContext<Authentication<unknown>>({\n state: initialState,\n login() {\n throw new Error('AuthContext not initialized');\n },\n logout() {\n throw new Error('AuthContext not initialized');\n },\n hasAccess(): boolean {\n throw new Error('AuthContext not initialized');\n },\n});\n\ninterface AuthConfig<TUser> {\n getRoles?(user: TUser): readonly string[];\n}\n\ninterface AuthProviderProps<TUser> extends React.PropsWithChildren {\n getAuthenticatedUser: GetUserFn<TUser>;\n config?: AuthConfig<TUser>;\n}\n\ninterface UserWithRoles {\n roles?: any;\n}\n\nconst getDefaultRoles = (user: unknown) => {\n const userWithRoles = user as UserWithRoles;\n return Array.isArray(userWithRoles.roles) ? userWithRoles.roles : [];\n};\n\nfunction AuthProvider<TUser>({ children, getAuthenticatedUser, config }: AuthProviderProps<TUser>) {\n const [state, dispatch] = useReducer(reducer, initialState);\n const authenticate = createAuthenticateThunk(dispatch, getAuthenticatedUser);\n const unauthenticate = createUnauthenticateThunk(dispatch);\n\n async function login(username: string, password: string, options?: LoginOptions): Promise<LoginResult> {\n const result = await _login(username, password, options);\n\n if (!result.error) {\n await authenticate();\n }\n\n return result;\n }\n\n async function logout(options?: LogoutOptions): Promise<void> {\n await _logout(options);\n unauthenticate();\n }\n\n function hasAccess({ loginRequired, requiresLogin, rolesAllowed }: AccessProps): boolean {\n const requiresAuth = loginRequired ?? requiresLogin ?? rolesAllowed;\n if (!requiresAuth) {\n return true;\n }\n\n if (!state.user) {\n return false;\n }\n\n if (rolesAllowed) {\n const userRoles = config?.getRoles ? config.getRoles(state.user as TUser) : getDefaultRoles(state.user);\n return rolesAllowed.some((allowedRole) => userRoles.includes(allowedRole));\n }\n\n return true;\n }\n\n useEffect(() => {\n authenticate().catch(() => {\n // Do nothing\n });\n }, []);\n\n const auth = {\n state,\n login,\n logout,\n hasAccess,\n };\n\n return <AuthContext.Provider value={auth}>{children}</AuthContext.Provider>;\n}\n\nexport type AuthHook<TUser> = () => Authentication<TUser>;\n\n/**\n * The hook that can be used to authenticate the user.\n * It returns the state of the authentication and the functions\n * to authenticate and unauthenticate the user.\n */\nfunction useAuth<TUser>(): Authentication<TUser> {\n return useContext(AuthContext) as Authentication<TUser>;\n}\n\ninterface AuthModule<TUser> {\n AuthProvider: React.FC<React.PropsWithChildren>;\n useAuth: AuthHook<TUser>;\n}\n\nexport function configureAuth<TUser>(\n getAuthenticatedUser: GetUserFn<TUser>,\n config?: AuthConfig<TUser>,\n): AuthModule<TUser> {\n function PreconfiguredAuthProvider({ children }: React.PropsWithChildren) {\n return (\n <AuthProvider<TUser> getAuthenticatedUser={getAuthenticatedUser} config={config}>\n {children}\n </AuthProvider>\n );\n }\n\n return {\n AuthProvider: PreconfiguredAuthProvider,\n useAuth: useAuth as AuthHook<TUser>,\n };\n}\n"],
|
|
5
5
|
"mappings": "AA2OS;AA3OT;AAAA,EACE,SAAS;AAAA,EAGT,UAAU;AAAA,EAEV;AAAA,OACK;AACP,SAAS,eAA8B,YAAY,WAAW,kBAAkB;AAKhF,MAAM,cAAc;AACpB,MAAM,gBAAgB;AACtB,MA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