@adonis-agora/authkit-react 0.15.0 → 0.17.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.
- package/build/index.d.ts +92 -76
- package/build/index.js +48 -40
- package/build/src/authkit_provider.js +1 -1
- package/build/src/client/client.d.ts +1 -1
- package/build/src/client/client.js +4 -2
- package/build/src/client/context.d.ts +1 -1
- package/build/src/client/context.js +1 -1
- package/build/src/components/authenticated.js +1 -1
- package/build/src/components/can_permission.d.ts +1 -1
- package/build/src/components/can_permission.js +2 -2
- package/build/src/components/interaction_form.d.ts +298 -0
- package/build/src/components/interaction_form.js +6 -0
- package/build/src/components/key_rotation.js +1 -1
- package/build/src/components/magic_link_button.d.ts +8 -0
- package/build/src/components/magic_link_button.js +10 -0
- package/build/src/components/oauth_button.d.ts +296 -0
- package/build/src/components/oauth_button.js +13 -0
- package/build/src/components/organization_profile.js +3 -3
- package/build/src/components/passkey_button.d.ts +2 -2
- package/build/src/components/passkey_button.js +9 -10
- package/build/src/components/password_strength_meter.js +1 -4
- package/build/src/components/user_button.js +1 -1
- package/build/src/components/user_profile.js +1 -1
- package/build/src/config.d.ts +1 -1
- package/build/src/config.js +16 -19
- package/build/src/hooks/use_can.js +8 -8
- package/build/src/hooks/use_organization.js +3 -1
- package/build/src/hooks/use_passkey_assertion.d.ts +12 -0
- package/build/src/hooks/use_passkey_assertion.js +19 -0
- package/build/src/hooks/use_passkey_autofill.js +10 -11
- package/build/src/hooks/use_passkey_login.js +2 -2
- package/build/src/hooks/use_passkey_registration.d.ts +12 -0
- package/build/src/hooks/use_passkey_registration.js +19 -0
- package/build/src/hooks/use_profile.d.ts +1 -1
- package/build/src/hooks/use_profile.js +5 -1
- package/build/src/hooks/use_resource.js +1 -1
- package/build/src/hooks/use_sign_in.js +1 -1
- package/build/src/hooks/use_sign_out.js +1 -1
- package/build/src/interaction/urls.d.ts +12 -0
- package/build/src/interaction/urls.js +15 -0
- package/build/src/passkey/authenticate.d.ts +20 -1
- package/build/src/passkey/authenticate.js +51 -31
- package/build/src/passkey/classic_form.d.ts +9 -0
- package/build/src/passkey/classic_form.js +18 -0
- package/build/src/passkey/sudo.d.ts +12 -0
- package/build/src/passkey/sudo.js +20 -0
- package/build/src/queries/account/index.d.ts +1 -1
- package/build/src/queries/admin/index.d.ts +1 -1
- package/build/src/use_auth.js +1 -1
- package/build/src/utils.d.ts +1 -0
- package/build/src/utils.js +3 -0
- package/package.json +7 -1
package/build/index.d.ts
CHANGED
|
@@ -1,76 +1,92 @@
|
|
|
1
|
-
export { useAuth } from
|
|
2
|
-
export { AuthProvider, AuthContext } from
|
|
3
|
-
export type { AuthProviderProps } from
|
|
4
|
-
export { AuthkitProvider } from
|
|
5
|
-
export type { AuthkitProviderProps } from
|
|
6
|
-
export { AuthkitConfigContext, useAuthkitConfig, resolveConfig, buildAuthUrl, DEFAULT_CONFIG, } from
|
|
7
|
-
export type { AuthkitConfig, ResolvedAuthkitConfig, AuthkitEndpoints, AuthkitIdpMode, } from
|
|
8
|
-
export { useSignIn } from
|
|
9
|
-
export type { SignInOptions } from
|
|
10
|
-
export { useSignOut } from
|
|
11
|
-
export type { SignOutOptions } from
|
|
12
|
-
export { useUser } from
|
|
13
|
-
export type { UseUserResult } from
|
|
14
|
-
export { useProfile } from
|
|
15
|
-
export type { UseProfileResult, ProfileUpdate, } from
|
|
16
|
-
export { useSessions } from
|
|
17
|
-
export type { UseSessionsResult, AuthSession, } from
|
|
18
|
-
export { useAuthorizedApps } from
|
|
19
|
-
export type { UseAuthorizedAppsResult, AuthorizedApp, } from
|
|
20
|
-
export { useOrganizations } from
|
|
21
|
-
export type { UseOrganizationsResult, OrgEntry, } from
|
|
22
|
-
export { useOrganization } from
|
|
23
|
-
export type { UseOrganizationResult, ActiveOrgDetail, OrgMemberEntry, } from
|
|
24
|
-
export { useSwitchOrganization } from
|
|
25
|
-
export type { UseSwitchOrganizationResult } from
|
|
26
|
-
export { useOrgInvitations } from
|
|
27
|
-
export type { UseOrgInvitationsResult, OrgInvitationEntry, } from
|
|
28
|
-
export { jsonRequest, useResource } from
|
|
29
|
-
export type { ResourceState } from
|
|
30
|
-
export { usePasskeyAutofill } from
|
|
31
|
-
export type { UsePasskeyAutofillOptions } from
|
|
32
|
-
export { usePasskeyLogin } from
|
|
33
|
-
export type { UsePasskeyLoginOptions, UsePasskeyLoginResult, } from
|
|
34
|
-
export { authenticatePasskey, submitPasskeyVerification, loadStartAuthentication, } from
|
|
35
|
-
export type { AuthenticatePasskeyOptions, SubmitPasskeyVerificationOptions, PasskeyCeremonyDeps, StartAuthenticationFn, } from
|
|
36
|
-
export {
|
|
37
|
-
export type {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export
|
|
41
|
-
export {
|
|
42
|
-
export
|
|
43
|
-
export {
|
|
44
|
-
export
|
|
45
|
-
export {
|
|
46
|
-
export
|
|
47
|
-
export {
|
|
48
|
-
export type {
|
|
49
|
-
export {
|
|
50
|
-
export type {
|
|
51
|
-
export {
|
|
52
|
-
export type {
|
|
53
|
-
export {
|
|
54
|
-
export type {
|
|
55
|
-
export {
|
|
56
|
-
export type {
|
|
57
|
-
export {
|
|
58
|
-
export type {
|
|
59
|
-
export {
|
|
60
|
-
export type {
|
|
61
|
-
export {
|
|
62
|
-
export type {
|
|
63
|
-
export {
|
|
64
|
-
export type {
|
|
65
|
-
export {
|
|
66
|
-
export type {
|
|
67
|
-
export {
|
|
68
|
-
export type {
|
|
69
|
-
export {
|
|
70
|
-
export type {
|
|
71
|
-
export
|
|
72
|
-
export {
|
|
73
|
-
export
|
|
74
|
-
export {
|
|
75
|
-
export {
|
|
76
|
-
export {
|
|
1
|
+
export { useAuth } from './src/use_auth.js';
|
|
2
|
+
export { AuthProvider, AuthContext } from './src/provider.js';
|
|
3
|
+
export type { AuthProviderProps } from './src/provider.js';
|
|
4
|
+
export { AuthkitProvider } from './src/authkit_provider.js';
|
|
5
|
+
export type { AuthkitProviderProps } from './src/authkit_provider.js';
|
|
6
|
+
export { AuthkitConfigContext, useAuthkitConfig, resolveConfig, buildAuthUrl, DEFAULT_CONFIG, } from './src/config.js';
|
|
7
|
+
export type { AuthkitConfig, ResolvedAuthkitConfig, AuthkitEndpoints, AuthkitIdpMode, } from './src/config.js';
|
|
8
|
+
export { useSignIn } from './src/hooks/use_sign_in.js';
|
|
9
|
+
export type { SignInOptions } from './src/hooks/use_sign_in.js';
|
|
10
|
+
export { useSignOut } from './src/hooks/use_sign_out.js';
|
|
11
|
+
export type { SignOutOptions } from './src/hooks/use_sign_out.js';
|
|
12
|
+
export { useUser } from './src/hooks/use_user.js';
|
|
13
|
+
export type { UseUserResult } from './src/hooks/use_user.js';
|
|
14
|
+
export { useProfile } from './src/hooks/use_profile.js';
|
|
15
|
+
export type { UseProfileResult, ProfileUpdate, } from './src/hooks/use_profile.js';
|
|
16
|
+
export { useSessions } from './src/hooks/use_sessions.js';
|
|
17
|
+
export type { UseSessionsResult, AuthSession, } from './src/hooks/use_sessions.js';
|
|
18
|
+
export { useAuthorizedApps } from './src/hooks/use_authorized_apps.js';
|
|
19
|
+
export type { UseAuthorizedAppsResult, AuthorizedApp, } from './src/hooks/use_authorized_apps.js';
|
|
20
|
+
export { useOrganizations } from './src/hooks/use_organizations.js';
|
|
21
|
+
export type { UseOrganizationsResult, OrgEntry, } from './src/hooks/use_organizations.js';
|
|
22
|
+
export { useOrganization } from './src/hooks/use_organization.js';
|
|
23
|
+
export type { UseOrganizationResult, ActiveOrgDetail, OrgMemberEntry, } from './src/hooks/use_organization.js';
|
|
24
|
+
export { useSwitchOrganization } from './src/hooks/use_switch_organization.js';
|
|
25
|
+
export type { UseSwitchOrganizationResult } from './src/hooks/use_switch_organization.js';
|
|
26
|
+
export { useOrgInvitations } from './src/hooks/use_org_invitations.js';
|
|
27
|
+
export type { UseOrgInvitationsResult, OrgInvitationEntry, } from './src/hooks/use_org_invitations.js';
|
|
28
|
+
export { jsonRequest, useResource } from './src/hooks/use_resource.js';
|
|
29
|
+
export type { ResourceState } from './src/hooks/use_resource.js';
|
|
30
|
+
export { usePasskeyAutofill } from './src/hooks/use_passkey_autofill.js';
|
|
31
|
+
export type { UsePasskeyAutofillOptions } from './src/hooks/use_passkey_autofill.js';
|
|
32
|
+
export { usePasskeyLogin } from './src/hooks/use_passkey_login.js';
|
|
33
|
+
export type { UsePasskeyLoginOptions, UsePasskeyLoginResult, } from './src/hooks/use_passkey_login.js';
|
|
34
|
+
export { authenticatePasskey, registerPasskey, submitPasskeyVerification, loadStartAuthentication, loadStartRegistration, } from './src/passkey/authenticate.js';
|
|
35
|
+
export type { AuthenticatePasskeyOptions, RegisterPasskeyOptions, SubmitPasskeyVerificationOptions, PasskeyCeremonyDeps, PasskeyRegistrationDeps, StartAuthenticationFn, StartRegistrationFn, } from './src/passkey/authenticate.js';
|
|
36
|
+
export { submitClassicForm } from './src/passkey/classic_form.js';
|
|
37
|
+
export type { SubmitClassicFormOptions, SubmitClassicFormDeps, } from './src/passkey/classic_form.js';
|
|
38
|
+
export { runPasskeyAssertion, runPasskeyRegistration } from './src/passkey/sudo.js';
|
|
39
|
+
export type { RunPasskeyFlowOptions, RunPasskeyAssertionDeps, RunPasskeyRegistrationDeps, } from './src/passkey/sudo.js';
|
|
40
|
+
export { usePasskeyAssertion } from './src/hooks/use_passkey_assertion.js';
|
|
41
|
+
export type { UsePasskeyAssertionOptions, UsePasskeyAssertionResult, } from './src/hooks/use_passkey_assertion.js';
|
|
42
|
+
export { usePasskeyRegistration } from './src/hooks/use_passkey_registration.js';
|
|
43
|
+
export type { UsePasskeyRegistrationOptions, UsePasskeyRegistrationResult, } from './src/hooks/use_passkey_registration.js';
|
|
44
|
+
export { usePasswordStrength, heuristicScorer, } from './src/hooks/use_password_strength.js';
|
|
45
|
+
export type { PasswordStrengthScore, PasswordStrengthResult, PasswordScorer, UsePasswordStrengthOptions, } from './src/hooks/use_password_strength.js';
|
|
46
|
+
export { deriveInitials, currentUrl, buttonClass } from './src/utils.js';
|
|
47
|
+
export { interactionUrls, oauthRedirectUrl } from './src/interaction/urls.js';
|
|
48
|
+
export type { InteractionUrls, InteractionPostStep, } from './src/interaction/urls.js';
|
|
49
|
+
export { Authenticated, Guest } from './src/components/authenticated.js';
|
|
50
|
+
export type { AuthenticatedProps, GuestProps, } from './src/components/authenticated.js';
|
|
51
|
+
export { CanPermission } from './src/components/can_permission.js';
|
|
52
|
+
export type { CanPermissionProps } from './src/components/can_permission.js';
|
|
53
|
+
export { useCan, checkCan, invalidateCanCache } from './src/hooks/use_can.js';
|
|
54
|
+
export type { UseCanResult } from './src/hooks/use_can.js';
|
|
55
|
+
export { SignInButton } from './src/components/sign_in_button.js';
|
|
56
|
+
export type { SignInButtonProps } from './src/components/sign_in_button.js';
|
|
57
|
+
export { SignOutButton } from './src/components/sign_out_button.js';
|
|
58
|
+
export type { SignOutButtonProps } from './src/components/sign_out_button.js';
|
|
59
|
+
export { Avatar } from './src/components/avatar.js';
|
|
60
|
+
export type { AvatarProps } from './src/components/avatar.js';
|
|
61
|
+
export { UserButton } from './src/components/user_button.js';
|
|
62
|
+
export type { UserButtonProps } from './src/components/user_button.js';
|
|
63
|
+
export { UserProfile } from './src/components/user_profile.js';
|
|
64
|
+
export type { UserProfileProps } from './src/components/user_profile.js';
|
|
65
|
+
export { AuthorizedApps } from './src/components/authorized_apps.js';
|
|
66
|
+
export type { AuthorizedAppsProps } from './src/components/authorized_apps.js';
|
|
67
|
+
export { PasswordStrengthMeter } from './src/components/password_strength_meter.js';
|
|
68
|
+
export type { PasswordStrengthMeterProps } from './src/components/password_strength_meter.js';
|
|
69
|
+
export { PasskeyButton } from './src/components/passkey_button.js';
|
|
70
|
+
export type { PasskeyButtonProps } from './src/components/passkey_button.js';
|
|
71
|
+
export { InteractionForm } from './src/components/interaction_form.js';
|
|
72
|
+
export type { InteractionFormProps } from './src/components/interaction_form.js';
|
|
73
|
+
export { MagicLinkButton } from './src/components/magic_link_button.js';
|
|
74
|
+
export type { MagicLinkButtonProps } from './src/components/magic_link_button.js';
|
|
75
|
+
export { OAuthButton } from './src/components/oauth_button.js';
|
|
76
|
+
export type { OAuthButtonProps } from './src/components/oauth_button.js';
|
|
77
|
+
export { OrganizationSwitcher } from './src/components/organization_switcher.js';
|
|
78
|
+
export type { OrganizationSwitcherProps } from './src/components/organization_switcher.js';
|
|
79
|
+
export { OrganizationProfile } from './src/components/organization_profile.js';
|
|
80
|
+
export type { OrganizationProfileProps } from './src/components/organization_profile.js';
|
|
81
|
+
export { KeyRotation } from './src/components/key_rotation.js';
|
|
82
|
+
export type { KeyRotationProps } from './src/components/key_rotation.js';
|
|
83
|
+
export { hasGlobalRole, hasAnyGlobalRole, hasAllGlobalRoles, } from './src/roles.js';
|
|
84
|
+
export type { AuthUser, AuthSharedProps, AuthState } from './src/types.js';
|
|
85
|
+
export { createAuthkitClient, AuthkitClientError, } from './src/client/client.js';
|
|
86
|
+
export type { AuthkitClient, AuthkitClientOptions, } from './src/client/client.js';
|
|
87
|
+
export type { AdminUser, AdminUserListResult, CreateUserInput, UpdateUserInput, UserSessionsResult, RevokeSessionsResult, AdminSessionEntry, AdminGrantEntry, AdminClient, AdminClientListResult, CreatedClientResult, RegenerateSecretResult, CreateClientInput, UpdateClientInput, RoleCatalogEntry, RoleListResult, CreateRoleInput, UpdateRoleInput, AdminOrgEntry, AdminOrgMember, AdminOrgInvitation, AdminOrgDetail, AdminOrgListResult, CreateOrgInput, UpdateOrgInput, AuditEventEntry, AuditListResult, AuditListParams, SettingEntry, SettingListResult, ImpersonationPanel, DailyPoint, AdminOverview, AccountCapabilities, AccountMe, AccountSecurityOverview, AccountSessionEntry, AccountSessionsResult, RevokeSessionResult, RevokeOthersResult, RevokeAllResult, AccountAppEntry, AccountAppsResult, RevokeAppResult, PasskeySummaryEntry, AccountMfaStatus, AccountPasskeysResult, RemovePasskeyResult, PatEntry, CreatedPatResult, AccountTokensResult, CreateTokenInput, RevokeTokenResult, UpdateProfileInput, UpdateProfileResult, ChangePasswordInput, RequestEmailChangeInput, OkResult, EmailChangeResult, AccountOrgEntry, AccountOrgsResult, AccountOrgDetail, AccountOrgInvitationsResult, ApiErrorBody, KeysStatus, ManagedKeyInfo, KeysRotateInput, KeysRotateResult, } from './src/client/types.js';
|
|
88
|
+
export { AuthkitClientProvider, useAuthkitClient, createAuthkitQueryClient, } from './src/client/context.js';
|
|
89
|
+
export type { AuthkitClientProviderProps } from './src/client/context.js';
|
|
90
|
+
export { authkitKeys } from './src/queries/keys.js';
|
|
91
|
+
export { useOverviewQueryOptions, useUsersQueryOptions, useUserQueryOptions, useUserSessionsQueryOptions, useCreateUserMutationOptions, useUpdateUserMutationOptions, useDisableUserMutationOptions, useEnableUserMutationOptions, useResetPasswordMutationOptions, useDeleteUserMutationOptions, useRevokeUserSessionsMutationOptions, useSessionsQueryOptions, useRevokeAllSessionsMutationOptions, useClientsQueryOptions, useClientQueryOptions, useCreateClientMutationOptions, useUpdateClientMutationOptions, useDeleteClientMutationOptions, useRegenerateClientSecretMutationOptions, useRolesQueryOptions, useCreateRoleMutationOptions, useUpdateRoleMutationOptions, useDeleteRoleMutationOptions, useOrgsQueryOptions, useOrgQueryOptions, useCreateOrgMutationOptions, useUpdateOrgMutationOptions, useDeleteOrgMutationOptions, useAddOrgMemberMutationOptions, useRemoveOrgMemberMutationOptions, useUpdateOrgMemberRoleMutationOptions, useCreateOrgInvitationMutationOptions, useRevokeOrgInvitationMutationOptions, useAuditQueryOptions, useSettingsQueryOptions, useSetSettingMutationOptions, useRemoveSettingMutationOptions, useImpersonationQueryOptions, useKeysQueryOptions, useRotateKeysMutationOptions, } from './src/queries/admin/index.js';
|
|
92
|
+
export { useMeQueryOptions, useSecurityQueryOptions, useUpdateProfileMutationOptions, useChangePasswordMutationOptions, useEmailChangeMutationOptions, useCancelEmailChangeMutationOptions, useAccountSessionsQueryOptions, useRevokeSessionMutationOptions, useRevokeOtherSessionsMutationOptions, useAccountRevokeAllSessionsMutationOptions, useAppsQueryOptions, useRevokeAppMutationOptions, useMfaQueryOptions, usePasskeysQueryOptions, useRemovePasskeyMutationOptions, useTokensQueryOptions, useCreateTokenMutationOptions, useRevokeTokenMutationOptions, useAccountOrgsQueryOptions, useAccountOrgQueryOptions, useAccountOrgInvitationsQueryOptions, } from './src/queries/account/index.js';
|
package/build/index.js
CHANGED
|
@@ -1,40 +1,48 @@
|
|
|
1
|
-
export { useAuth } from
|
|
2
|
-
export { AuthProvider, AuthContext } from
|
|
3
|
-
export { AuthkitProvider } from
|
|
4
|
-
export { AuthkitConfigContext, useAuthkitConfig, resolveConfig, buildAuthUrl, DEFAULT_CONFIG, } from
|
|
5
|
-
export { useSignIn } from
|
|
6
|
-
export { useSignOut } from
|
|
7
|
-
export { useUser } from
|
|
8
|
-
export { useProfile } from
|
|
9
|
-
export { useSessions } from
|
|
10
|
-
export { useAuthorizedApps } from
|
|
11
|
-
export { useOrganizations } from
|
|
12
|
-
export { useOrganization } from
|
|
13
|
-
export { useSwitchOrganization } from
|
|
14
|
-
export { useOrgInvitations } from
|
|
15
|
-
export { jsonRequest, useResource } from
|
|
16
|
-
export { usePasskeyAutofill } from
|
|
17
|
-
export { usePasskeyLogin } from
|
|
18
|
-
export { authenticatePasskey, submitPasskeyVerification, loadStartAuthentication, } from
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
1
|
+
export { useAuth } from './src/use_auth.js';
|
|
2
|
+
export { AuthProvider, AuthContext } from './src/provider.js';
|
|
3
|
+
export { AuthkitProvider } from './src/authkit_provider.js';
|
|
4
|
+
export { AuthkitConfigContext, useAuthkitConfig, resolveConfig, buildAuthUrl, DEFAULT_CONFIG, } from './src/config.js';
|
|
5
|
+
export { useSignIn } from './src/hooks/use_sign_in.js';
|
|
6
|
+
export { useSignOut } from './src/hooks/use_sign_out.js';
|
|
7
|
+
export { useUser } from './src/hooks/use_user.js';
|
|
8
|
+
export { useProfile } from './src/hooks/use_profile.js';
|
|
9
|
+
export { useSessions } from './src/hooks/use_sessions.js';
|
|
10
|
+
export { useAuthorizedApps } from './src/hooks/use_authorized_apps.js';
|
|
11
|
+
export { useOrganizations } from './src/hooks/use_organizations.js';
|
|
12
|
+
export { useOrganization } from './src/hooks/use_organization.js';
|
|
13
|
+
export { useSwitchOrganization } from './src/hooks/use_switch_organization.js';
|
|
14
|
+
export { useOrgInvitations } from './src/hooks/use_org_invitations.js';
|
|
15
|
+
export { jsonRequest, useResource } from './src/hooks/use_resource.js';
|
|
16
|
+
export { usePasskeyAutofill } from './src/hooks/use_passkey_autofill.js';
|
|
17
|
+
export { usePasskeyLogin } from './src/hooks/use_passkey_login.js';
|
|
18
|
+
export { authenticatePasskey, registerPasskey, submitPasskeyVerification, loadStartAuthentication, loadStartRegistration, } from './src/passkey/authenticate.js';
|
|
19
|
+
export { submitClassicForm } from './src/passkey/classic_form.js';
|
|
20
|
+
export { runPasskeyAssertion, runPasskeyRegistration } from './src/passkey/sudo.js';
|
|
21
|
+
export { usePasskeyAssertion } from './src/hooks/use_passkey_assertion.js';
|
|
22
|
+
export { usePasskeyRegistration } from './src/hooks/use_passkey_registration.js';
|
|
23
|
+
export { usePasswordStrength, heuristicScorer, } from './src/hooks/use_password_strength.js';
|
|
24
|
+
export { deriveInitials, currentUrl, buttonClass } from './src/utils.js';
|
|
25
|
+
export { interactionUrls, oauthRedirectUrl } from './src/interaction/urls.js';
|
|
26
|
+
export { Authenticated, Guest } from './src/components/authenticated.js';
|
|
27
|
+
export { CanPermission } from './src/components/can_permission.js';
|
|
28
|
+
export { useCan, checkCan, invalidateCanCache } from './src/hooks/use_can.js';
|
|
29
|
+
export { SignInButton } from './src/components/sign_in_button.js';
|
|
30
|
+
export { SignOutButton } from './src/components/sign_out_button.js';
|
|
31
|
+
export { Avatar } from './src/components/avatar.js';
|
|
32
|
+
export { UserButton } from './src/components/user_button.js';
|
|
33
|
+
export { UserProfile } from './src/components/user_profile.js';
|
|
34
|
+
export { AuthorizedApps } from './src/components/authorized_apps.js';
|
|
35
|
+
export { PasswordStrengthMeter } from './src/components/password_strength_meter.js';
|
|
36
|
+
export { PasskeyButton } from './src/components/passkey_button.js';
|
|
37
|
+
export { InteractionForm } from './src/components/interaction_form.js';
|
|
38
|
+
export { MagicLinkButton } from './src/components/magic_link_button.js';
|
|
39
|
+
export { OAuthButton } from './src/components/oauth_button.js';
|
|
40
|
+
export { OrganizationSwitcher } from './src/components/organization_switcher.js';
|
|
41
|
+
export { OrganizationProfile } from './src/components/organization_profile.js';
|
|
42
|
+
export { KeyRotation } from './src/components/key_rotation.js';
|
|
43
|
+
export { hasGlobalRole, hasAnyGlobalRole, hasAllGlobalRoles, } from './src/roles.js';
|
|
44
|
+
export { createAuthkitClient, AuthkitClientError, } from './src/client/client.js';
|
|
45
|
+
export { AuthkitClientProvider, useAuthkitClient, createAuthkitQueryClient, } from './src/client/context.js';
|
|
46
|
+
export { authkitKeys } from './src/queries/keys.js';
|
|
47
|
+
export { useOverviewQueryOptions, useUsersQueryOptions, useUserQueryOptions, useUserSessionsQueryOptions, useCreateUserMutationOptions, useUpdateUserMutationOptions, useDisableUserMutationOptions, useEnableUserMutationOptions, useResetPasswordMutationOptions, useDeleteUserMutationOptions, useRevokeUserSessionsMutationOptions, useSessionsQueryOptions, useRevokeAllSessionsMutationOptions, useClientsQueryOptions, useClientQueryOptions, useCreateClientMutationOptions, useUpdateClientMutationOptions, useDeleteClientMutationOptions, useRegenerateClientSecretMutationOptions, useRolesQueryOptions, useCreateRoleMutationOptions, useUpdateRoleMutationOptions, useDeleteRoleMutationOptions, useOrgsQueryOptions, useOrgQueryOptions, useCreateOrgMutationOptions, useUpdateOrgMutationOptions, useDeleteOrgMutationOptions, useAddOrgMemberMutationOptions, useRemoveOrgMemberMutationOptions, useUpdateOrgMemberRoleMutationOptions, useCreateOrgInvitationMutationOptions, useRevokeOrgInvitationMutationOptions, useAuditQueryOptions, useSettingsQueryOptions, useSetSettingMutationOptions, useRemoveSettingMutationOptions, useImpersonationQueryOptions, useKeysQueryOptions, useRotateKeysMutationOptions, } from './src/queries/admin/index.js';
|
|
48
|
+
export { useMeQueryOptions, useSecurityQueryOptions, useUpdateProfileMutationOptions, useChangePasswordMutationOptions, useEmailChangeMutationOptions, useCancelEmailChangeMutationOptions, useAccountSessionsQueryOptions, useRevokeSessionMutationOptions, useRevokeOtherSessionsMutationOptions, useAccountRevokeAllSessionsMutationOptions, useAppsQueryOptions, useRevokeAppMutationOptions, useMfaQueryOptions, usePasskeysQueryOptions, useRemovePasskeyMutationOptions, useTokensQueryOptions, useCreateTokenMutationOptions, useRevokeTokenMutationOptions, useAccountOrgsQueryOptions, useAccountOrgQueryOptions, useAccountOrgInvitationsQueryOptions, } from './src/queries/account/index.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
|
-
import { AuthContext } from './provider.js';
|
|
3
2
|
import { AuthkitConfigContext, resolveConfig } from './config.js';
|
|
3
|
+
import { AuthContext } from './provider.js';
|
|
4
4
|
export function AuthkitProvider({ config, value, children }) {
|
|
5
5
|
const resolved = resolveConfig(config);
|
|
6
6
|
const tree = createElement(AuthkitConfigContext.Provider, { value: resolved }, children);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AccountAppsResult, AccountMe, AccountMfaStatus, AccountOrgDetail, AccountOrgInvitationsResult, AccountOrgsResult, AccountPasskeysResult, AccountSecurityOverview, AccountSessionsResult, AccountTokensResult, AdminClient, AdminClientListResult, AdminOrgDetail, AdminOrgEntry, AdminOrgInvitation, AdminOrgListResult, AdminOverview, AdminUser, AdminUserListResult, AuditListParams, AuditListResult, ChangePasswordInput, CreateClientInput, CreateOrgInput, CreateRoleInput, CreateTokenInput, CreateUserInput, CreatedClientResult, CreatedPatResult, EmailChangeResult, ImpersonationPanel, KeysRotateInput, KeysRotateResult, KeysStatus, OkResult, RegenerateSecretResult, RemovePasskeyResult, RequestEmailChangeInput, RevokeAllResult, RevokeAppResult, RevokeOthersResult, RevokeSessionResult, RevokeSessionsResult, RevokeTokenResult, RoleCatalogEntry, RoleListResult, SettingEntry, SettingListResult, UpdateClientInput, UpdateOrgInput, UpdateProfileInput, UpdateProfileResult, UpdateRoleInput, UpdateUserInput, UserSessionsResult } from './types.js';
|
|
2
2
|
export declare class AuthkitClientError extends Error {
|
|
3
3
|
readonly status: number;
|
|
4
4
|
readonly code?: string | undefined;
|
|
@@ -81,7 +81,7 @@ class AuthkitClient {
|
|
|
81
81
|
throw new AuthkitClientError(res.status, message, code, parsed);
|
|
82
82
|
}
|
|
83
83
|
const text = await res.text();
|
|
84
|
-
return
|
|
84
|
+
return text ? JSON.parse(text) : null;
|
|
85
85
|
}
|
|
86
86
|
get(path, params) {
|
|
87
87
|
const qs = params ? toQueryString(params) : '';
|
|
@@ -164,7 +164,9 @@ class AuthkitClient {
|
|
|
164
164
|
},
|
|
165
165
|
set: (key, value, orgId) => {
|
|
166
166
|
const qs = orgId ? `?organizationId=${encodeURIComponent(orgId)}` : '';
|
|
167
|
-
return this.put(this.b(`/settings/${encodeURIComponent(key)}${qs}`), {
|
|
167
|
+
return this.put(this.b(`/settings/${encodeURIComponent(key)}${qs}`), {
|
|
168
|
+
value,
|
|
169
|
+
});
|
|
168
170
|
},
|
|
169
171
|
remove: (key, orgId) => {
|
|
170
172
|
const qs = orgId ? `?organizationId=${encodeURIComponent(orgId)}` : '';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
1
|
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
3
|
import { type AuthkitClient, type AuthkitClientOptions } from './client.js';
|
|
4
4
|
export declare function useAuthkitClient(): AuthkitClient;
|
|
5
5
|
export interface AuthkitClientProviderProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createContext, createElement, useContext } from 'react';
|
|
2
1
|
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { createContext, createElement, useContext } from 'react';
|
|
3
3
|
import { createAuthkitClient } from './client.js';
|
|
4
4
|
const AuthkitClientContext = createContext(null);
|
|
5
5
|
export function useAuthkitClient() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCan } from
|
|
1
|
+
import { Fragment, createElement } from 'react';
|
|
2
|
+
import { useCan } from '../hooks/use_can.js';
|
|
3
3
|
export function CanPermission({ children, permission, resource, loadingFallback = null, fallback = null, }) {
|
|
4
4
|
const { allowed, loading } = useCan(permission, resource);
|
|
5
5
|
const out = loading ? loadingFallback : allowed ? children : fallback;
|