-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.ts
More file actions
94 lines (88 loc) · 3.12 KB
/
Copy pathindex.ts
File metadata and controls
94 lines (88 loc) · 3.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/**
* ObjectUI
* Copyright (c) 2024-present ObjectStack Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @object-ui/auth
*
* Authentication system for Object UI providing:
* - AuthProvider context for React apps
* - useAuth hook for accessing auth state and methods
* - AuthGuard component for route protection
* - LoginForm, RegisterForm, ForgotPasswordForm UI components
* - UserMenu component for authenticated user display
* - createAuthClient factory for auth backend integration
* - createAuthenticatedFetch for DataSource token injection
*
* @packageDocumentation
*/
export { AuthProvider, type AuthProviderProps } from './AuthProvider';
export { useAuth } from './useAuth';
export { useIsWorkspaceAdmin } from './useIsWorkspaceAdmin';
export { AuthGuard, type AuthGuardProps } from './AuthGuard';
export { AuthShell, type AuthShellProps, type AuthShellBrandPanel } from './AuthShell';
export { LoginForm, type LoginFormProps, type LoginFormLabels } from './LoginForm';
export { RegisterForm, type RegisterFormProps, type RegisterFormLabels } from './RegisterForm';
export { ForgotPasswordForm, type ForgotPasswordFormProps, type ForgotPasswordFormLabels } from './ForgotPasswordForm';
export { SocialSignInButtons, type SocialSignInButtonsProps } from './SocialSignInButtons';
export { UserMenu, type UserMenuProps } from './UserMenu';
export { PreviewBanner, type PreviewBannerProps } from './PreviewBanner';
export { createAuthClient, TokenStorage } from './createAuthClient';
export { normalizePhoneIdentifier, looksLikePhoneIdentifier } from './phone-identifier';
export { createAuthenticatedFetch, ActiveOrganizationStorage, type AuthenticatedAdapterOptions } from './createAuthenticatedFetch';
export { getUserInitials } from './types';
// Organization membership-role vocabulary — a CLOSED, framework-owned list of
// four (framework ADR-0108) — plus the narrowing helpers every org screen
// shares. See `org-roles.ts` for why this still mirrors rather than derives.
export {
ORG_ROLE_OWNER,
ORG_ROLE_ADMIN,
ORG_ROLE_DELEGATED_ADMIN,
ORG_ROLE_MEMBER,
ORG_ROLES,
ORG_ROLE_LABELS,
orgRoleGrade,
invitableOrgRoles,
assignableOrgRoles,
type OrgRole,
} from './org-roles';
// Shared auth form primitives — exposed so consumers can build custom forms
// that match the look of LoginForm / RegisterForm / ForgotPasswordForm.
export {
AUTH_FIELD_LABEL_CLASS,
AUTH_INPUT_CLASS,
AUTH_LINK_CLASS,
AUTH_PRIMARY_BUTTON_CLASS,
AuthAlertIcon,
AuthCheckIcon,
AuthDivider,
AuthErrorBanner,
AuthFormHeader,
AuthMailIcon,
AuthSpinner,
} from './authStyles';
// Re-export types for convenience
export type {
AuthUser,
AuthSession,
AuthState,
AuthClient,
AuthClientConfig,
AuthLinkComponentProps,
AuthProviderConfig,
PreviewModeOptions,
SignInCredentials,
SignUpData,
AuthOrganization,
AuthOrganizationMember,
AuthInvitation,
AuthSocialProvider,
AuthPublicConfig,
SignInWithProviderOptions,
TenancyPosture,
DelegableScope,
} from './types';
export type { AuthContextValue } from './AuthContext';