@meistrari/auth-core 1.41.2 → 1.43.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/dist/index.d.mts +87 -38
- package/dist/index.d.ts +87 -38
- package/dist/index.mjs +47 -6
- package/package.json +31 -31
package/dist/index.d.mts
CHANGED
|
@@ -520,6 +520,56 @@ declare class SessionAssuranceService {
|
|
|
520
520
|
completeOAuthStepUp(stepUpToken: string): Promise<OAuthCompleteStepUpResponse>;
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
+
/**
|
|
524
|
+
* Options for signing in with a social provider (Google or Microsoft).
|
|
525
|
+
*/
|
|
526
|
+
type SocialSignInOptions = {
|
|
527
|
+
/** The social identity provider to authenticate with. */
|
|
528
|
+
provider: 'google' | 'microsoft';
|
|
529
|
+
/** URL to redirect to after successful authentication. */
|
|
530
|
+
callbackURL: string;
|
|
531
|
+
/** URL to redirect to if authentication fails. Falls back to the API's default error page if not provided. */
|
|
532
|
+
errorCallbackURL?: string;
|
|
533
|
+
/** Email address to preselect at the provider, sent as the `login_hint` authorization parameter. */
|
|
534
|
+
loginHint?: string;
|
|
535
|
+
};
|
|
536
|
+
/**
|
|
537
|
+
* Options for signing in via SAML Single Sign-On.
|
|
538
|
+
*/
|
|
539
|
+
type SignInWithSamlOptions = {
|
|
540
|
+
/** The user's email address, used to resolve the correct SAML identity provider. */
|
|
541
|
+
email: string;
|
|
542
|
+
/** URL to redirect to after successful authentication. */
|
|
543
|
+
callbackURL: string;
|
|
544
|
+
/** URL to redirect to if authentication fails. Falls back to the API's default error page if not provided. */
|
|
545
|
+
errorCallbackURL?: string;
|
|
546
|
+
};
|
|
547
|
+
/**
|
|
548
|
+
* Options for signing in with email and password credentials.
|
|
549
|
+
*/
|
|
550
|
+
type SignInWithEmailAndPasswordOptions = {
|
|
551
|
+
/** The user's email address. */
|
|
552
|
+
email: string;
|
|
553
|
+
/** The user's password. */
|
|
554
|
+
password: string;
|
|
555
|
+
/** URL to redirect to after successful authentication. */
|
|
556
|
+
callbackURL: string;
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* Interactive login methods an environment can enable (`AUTH_LOGIN_METHODS`).
|
|
560
|
+
* Session-carrying mechanisms (JWT, API keys, application tokens) are not
|
|
561
|
+
* login methods.
|
|
562
|
+
*/
|
|
563
|
+
declare const LOGIN_METHODS: readonly ["password", "google", "microsoft", "saml", "otp"];
|
|
564
|
+
type LoginMethod = typeof LOGIN_METHODS[number];
|
|
565
|
+
/**
|
|
566
|
+
* Response of the public `GET /login-methods` endpoint.
|
|
567
|
+
*/
|
|
568
|
+
type LoginMethodsResponse = {
|
|
569
|
+
/** Login methods enabled in the environment, regardless of application. */
|
|
570
|
+
loginMethods: LoginMethod[];
|
|
571
|
+
};
|
|
572
|
+
|
|
523
573
|
declare const DEFAULT_SESSION_ASSURANCE_CONFIG: ApplicationSessionAssuranceConfig;
|
|
524
574
|
declare const DEFAULT_APPLICATION_CONFIG: {
|
|
525
575
|
version: 1;
|
|
@@ -565,6 +615,11 @@ type ListCandidateOrganizationsResponse = FullOrganization[];
|
|
|
565
615
|
type ApplicationAuthContextResponse = {
|
|
566
616
|
/** Minimal application identity shown in the hosted auth flow. */
|
|
567
617
|
application: Pick<Application, 'id' | 'name' | 'config'>;
|
|
618
|
+
/**
|
|
619
|
+
* Login methods usable for this application: the environment allowlist
|
|
620
|
+
* intersected with the application's accepted AMRs.
|
|
621
|
+
*/
|
|
622
|
+
loginMethods: LoginMethod[];
|
|
568
623
|
};
|
|
569
624
|
/**
|
|
570
625
|
* Response returned when starting an authorization flow.
|
|
@@ -3552,6 +3607,23 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3552
3607
|
}>;
|
|
3553
3608
|
};
|
|
3554
3609
|
};
|
|
3610
|
+
} | {
|
|
3611
|
+
id: "login-methods";
|
|
3612
|
+
getActions: ($fetch: better_auth_client.BetterFetch) => {
|
|
3613
|
+
loginMethods: {
|
|
3614
|
+
get: () => Promise<{
|
|
3615
|
+
data: null;
|
|
3616
|
+
error: {
|
|
3617
|
+
message?: string | undefined;
|
|
3618
|
+
status: number;
|
|
3619
|
+
statusText: string;
|
|
3620
|
+
};
|
|
3621
|
+
} | {
|
|
3622
|
+
data: LoginMethodsResponse;
|
|
3623
|
+
error: null;
|
|
3624
|
+
}>;
|
|
3625
|
+
};
|
|
3626
|
+
};
|
|
3555
3627
|
} | {
|
|
3556
3628
|
id: "email-otp";
|
|
3557
3629
|
version: string;
|
|
@@ -4940,6 +5012,12 @@ type InviteAdminOrganizationUsersOptions = {
|
|
|
4940
5012
|
* Defaults to true (send an invitation email).
|
|
4941
5013
|
*/
|
|
4942
5014
|
sendInvite?: boolean;
|
|
5015
|
+
/**
|
|
5016
|
+
* Initial password for accounts created by a force add (`sendInvite:
|
|
5017
|
+
* false`); rejected otherwise. 8–128 characters. Only applied to users
|
|
5018
|
+
* without a password yet — an existing credential is never overwritten.
|
|
5019
|
+
*/
|
|
5020
|
+
password?: string;
|
|
4943
5021
|
};
|
|
4944
5022
|
/**
|
|
4945
5023
|
* Per-email outcome of a batch organization invite.
|
|
@@ -5759,42 +5837,6 @@ declare class OrganizationService {
|
|
|
5759
5837
|
removeTeamMember(teamId: string, userId: string): Promise<void>;
|
|
5760
5838
|
}
|
|
5761
5839
|
|
|
5762
|
-
/**
|
|
5763
|
-
* Options for signing in with a social provider (Google or Microsoft).
|
|
5764
|
-
*/
|
|
5765
|
-
type SocialSignInOptions = {
|
|
5766
|
-
/** The social identity provider to authenticate with. */
|
|
5767
|
-
provider: 'google' | 'microsoft';
|
|
5768
|
-
/** URL to redirect to after successful authentication. */
|
|
5769
|
-
callbackURL: string;
|
|
5770
|
-
/** URL to redirect to if authentication fails. Falls back to the API's default error page if not provided. */
|
|
5771
|
-
errorCallbackURL?: string;
|
|
5772
|
-
/** Email address to preselect at the provider, sent as the `login_hint` authorization parameter. */
|
|
5773
|
-
loginHint?: string;
|
|
5774
|
-
};
|
|
5775
|
-
/**
|
|
5776
|
-
* Options for signing in via SAML Single Sign-On.
|
|
5777
|
-
*/
|
|
5778
|
-
type SignInWithSamlOptions = {
|
|
5779
|
-
/** The user's email address, used to resolve the correct SAML identity provider. */
|
|
5780
|
-
email: string;
|
|
5781
|
-
/** URL to redirect to after successful authentication. */
|
|
5782
|
-
callbackURL: string;
|
|
5783
|
-
/** URL to redirect to if authentication fails. Falls back to the API's default error page if not provided. */
|
|
5784
|
-
errorCallbackURL?: string;
|
|
5785
|
-
};
|
|
5786
|
-
/**
|
|
5787
|
-
* Options for signing in with email and password credentials.
|
|
5788
|
-
*/
|
|
5789
|
-
type SignInWithEmailAndPasswordOptions = {
|
|
5790
|
-
/** The user's email address. */
|
|
5791
|
-
email: string;
|
|
5792
|
-
/** The user's password. */
|
|
5793
|
-
password: string;
|
|
5794
|
-
/** URL to redirect to after successful authentication. */
|
|
5795
|
-
callbackURL: string;
|
|
5796
|
-
};
|
|
5797
|
-
|
|
5798
5840
|
/**
|
|
5799
5841
|
* Service for managing user authentication sessions.
|
|
5800
5842
|
*
|
|
@@ -5865,6 +5907,13 @@ declare class SessionService {
|
|
|
5865
5907
|
getToken(): Promise<{
|
|
5866
5908
|
token: string;
|
|
5867
5909
|
}>;
|
|
5910
|
+
/**
|
|
5911
|
+
* Lists the login methods enabled in the environment. Public; safe to call
|
|
5912
|
+
* before authentication to decide which sign-in options to render.
|
|
5913
|
+
*
|
|
5914
|
+
* @returns The enabled login methods
|
|
5915
|
+
*/
|
|
5916
|
+
getLoginMethods(): Promise<("google" | "microsoft" | "password" | "saml" | "otp")[]>;
|
|
5868
5917
|
/**
|
|
5869
5918
|
* Initiates social authentication flow with Google or Microsoft.
|
|
5870
5919
|
*
|
|
@@ -6375,5 +6424,5 @@ declare function validateToken(token: string, apiUrl: string): Promise<boolean>;
|
|
|
6375
6424
|
*/
|
|
6376
6425
|
declare function extractTokenPayload(token: string): DecodedJWTPayload;
|
|
6377
6426
|
|
|
6378
|
-
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, AuthClient, AuthMethod, AuthMethodBrand, AuthMethods, AuthorizationFlowError, DEFAULT_APPLICATION_CONFIG, DEFAULT_JWT_ASSURANCE, DEFAULT_SESSION_ASSURANCE_CONFIG, DeviceAccessDeniedError, DeviceAuthorizationPendingError, DeviceAuthorizationSlowDownError, DeviceCodeExpiredError, DeviceTransientServerError, EmailOTPService, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, JWTPayload, JWTPayloadAssurance, JWTPayloadUser, JWTPayloadWorkspace, OAuthBeginStepUpResponse, OAuthCompleteStepUpResponse, OAuthStepUpProvider, RefreshTokenExpiredError, Roles, SENSITIVE_ACTION_ASSURANCE_POLICY, STEP_UP_MAX_AGE_SECONDS, SendOtpResponse, SessionAssurancePolicy, SessionAssuranceRequiredError, SessionAssuranceRequiredPayload, SessionAssuranceResponse, SessionAssuranceService, StepUpOption, UserNotLoggedInError, ac, assuranceFields, canStepUpWithAmr, createAPIClient, extractTokenPayload, getAalRank, invitationAdditionalFields, isAssuranceSufficientForPolicy, isSessionAssuranceSufficient, isTokenExpired, memberAdditionalFields, mergeStepUpAssurance, organizationAdditionalFields, parseSessionAssuranceRequiredPayload, rolesAccessControl, sessionAssurancePluginClient, userAdditionalFields, validateToken };
|
|
6379
|
-
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeleteAdminOrganizationTeamOptions, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InvitationPasswordSetupResult, InvitationSignupStatus, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, ListOrganizationsOptions, ListOrganizationsWithRoleOptions, Member, NoncePayloadResponse, ExtendedOrganization as Organization, OrganizationSettings, OrganizationWithRole, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, ResendAdminInviteOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, TeamMembersResponse, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateAdminOrganizationTeamOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|
|
6427
|
+
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, AuthClient, AuthMethod, AuthMethodBrand, AuthMethods, AuthorizationFlowError, DEFAULT_APPLICATION_CONFIG, DEFAULT_JWT_ASSURANCE, DEFAULT_SESSION_ASSURANCE_CONFIG, DeviceAccessDeniedError, DeviceAuthorizationPendingError, DeviceAuthorizationSlowDownError, DeviceCodeExpiredError, DeviceTransientServerError, EmailOTPService, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, JWTPayload, JWTPayloadAssurance, JWTPayloadUser, JWTPayloadWorkspace, LOGIN_METHODS, OAuthBeginStepUpResponse, OAuthCompleteStepUpResponse, OAuthStepUpProvider, RefreshTokenExpiredError, Roles, SENSITIVE_ACTION_ASSURANCE_POLICY, STEP_UP_MAX_AGE_SECONDS, SendOtpResponse, SessionAssurancePolicy, SessionAssuranceRequiredError, SessionAssuranceRequiredPayload, SessionAssuranceResponse, SessionAssuranceService, StepUpOption, UserNotLoggedInError, ac, assuranceFields, canStepUpWithAmr, createAPIClient, extractTokenPayload, getAalRank, invitationAdditionalFields, isAssuranceSufficientForPolicy, isSessionAssuranceSufficient, isTokenExpired, memberAdditionalFields, mergeStepUpAssurance, organizationAdditionalFields, parseSessionAssuranceRequiredPayload, rolesAccessControl, sessionAssurancePluginClient, userAdditionalFields, validateToken };
|
|
6428
|
+
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeleteAdminOrganizationTeamOptions, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InvitationPasswordSetupResult, InvitationSignupStatus, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, ListOrganizationsOptions, ListOrganizationsWithRoleOptions, LoginMethod, LoginMethodsResponse, Member, NoncePayloadResponse, ExtendedOrganization as Organization, OrganizationSettings, OrganizationWithRole, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, ResendAdminInviteOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, TeamMembersResponse, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateAdminOrganizationTeamOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -520,6 +520,56 @@ declare class SessionAssuranceService {
|
|
|
520
520
|
completeOAuthStepUp(stepUpToken: string): Promise<OAuthCompleteStepUpResponse>;
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
+
/**
|
|
524
|
+
* Options for signing in with a social provider (Google or Microsoft).
|
|
525
|
+
*/
|
|
526
|
+
type SocialSignInOptions = {
|
|
527
|
+
/** The social identity provider to authenticate with. */
|
|
528
|
+
provider: 'google' | 'microsoft';
|
|
529
|
+
/** URL to redirect to after successful authentication. */
|
|
530
|
+
callbackURL: string;
|
|
531
|
+
/** URL to redirect to if authentication fails. Falls back to the API's default error page if not provided. */
|
|
532
|
+
errorCallbackURL?: string;
|
|
533
|
+
/** Email address to preselect at the provider, sent as the `login_hint` authorization parameter. */
|
|
534
|
+
loginHint?: string;
|
|
535
|
+
};
|
|
536
|
+
/**
|
|
537
|
+
* Options for signing in via SAML Single Sign-On.
|
|
538
|
+
*/
|
|
539
|
+
type SignInWithSamlOptions = {
|
|
540
|
+
/** The user's email address, used to resolve the correct SAML identity provider. */
|
|
541
|
+
email: string;
|
|
542
|
+
/** URL to redirect to after successful authentication. */
|
|
543
|
+
callbackURL: string;
|
|
544
|
+
/** URL to redirect to if authentication fails. Falls back to the API's default error page if not provided. */
|
|
545
|
+
errorCallbackURL?: string;
|
|
546
|
+
};
|
|
547
|
+
/**
|
|
548
|
+
* Options for signing in with email and password credentials.
|
|
549
|
+
*/
|
|
550
|
+
type SignInWithEmailAndPasswordOptions = {
|
|
551
|
+
/** The user's email address. */
|
|
552
|
+
email: string;
|
|
553
|
+
/** The user's password. */
|
|
554
|
+
password: string;
|
|
555
|
+
/** URL to redirect to after successful authentication. */
|
|
556
|
+
callbackURL: string;
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* Interactive login methods an environment can enable (`AUTH_LOGIN_METHODS`).
|
|
560
|
+
* Session-carrying mechanisms (JWT, API keys, application tokens) are not
|
|
561
|
+
* login methods.
|
|
562
|
+
*/
|
|
563
|
+
declare const LOGIN_METHODS: readonly ["password", "google", "microsoft", "saml", "otp"];
|
|
564
|
+
type LoginMethod = typeof LOGIN_METHODS[number];
|
|
565
|
+
/**
|
|
566
|
+
* Response of the public `GET /login-methods` endpoint.
|
|
567
|
+
*/
|
|
568
|
+
type LoginMethodsResponse = {
|
|
569
|
+
/** Login methods enabled in the environment, regardless of application. */
|
|
570
|
+
loginMethods: LoginMethod[];
|
|
571
|
+
};
|
|
572
|
+
|
|
523
573
|
declare const DEFAULT_SESSION_ASSURANCE_CONFIG: ApplicationSessionAssuranceConfig;
|
|
524
574
|
declare const DEFAULT_APPLICATION_CONFIG: {
|
|
525
575
|
version: 1;
|
|
@@ -565,6 +615,11 @@ type ListCandidateOrganizationsResponse = FullOrganization[];
|
|
|
565
615
|
type ApplicationAuthContextResponse = {
|
|
566
616
|
/** Minimal application identity shown in the hosted auth flow. */
|
|
567
617
|
application: Pick<Application, 'id' | 'name' | 'config'>;
|
|
618
|
+
/**
|
|
619
|
+
* Login methods usable for this application: the environment allowlist
|
|
620
|
+
* intersected with the application's accepted AMRs.
|
|
621
|
+
*/
|
|
622
|
+
loginMethods: LoginMethod[];
|
|
568
623
|
};
|
|
569
624
|
/**
|
|
570
625
|
* Response returned when starting an authorization flow.
|
|
@@ -3552,6 +3607,23 @@ declare function createAPIClient(apiUrl: string, fetchOptions?: BetterFetchOptio
|
|
|
3552
3607
|
}>;
|
|
3553
3608
|
};
|
|
3554
3609
|
};
|
|
3610
|
+
} | {
|
|
3611
|
+
id: "login-methods";
|
|
3612
|
+
getActions: ($fetch: better_auth_client.BetterFetch) => {
|
|
3613
|
+
loginMethods: {
|
|
3614
|
+
get: () => Promise<{
|
|
3615
|
+
data: null;
|
|
3616
|
+
error: {
|
|
3617
|
+
message?: string | undefined;
|
|
3618
|
+
status: number;
|
|
3619
|
+
statusText: string;
|
|
3620
|
+
};
|
|
3621
|
+
} | {
|
|
3622
|
+
data: LoginMethodsResponse;
|
|
3623
|
+
error: null;
|
|
3624
|
+
}>;
|
|
3625
|
+
};
|
|
3626
|
+
};
|
|
3555
3627
|
} | {
|
|
3556
3628
|
id: "email-otp";
|
|
3557
3629
|
version: string;
|
|
@@ -4940,6 +5012,12 @@ type InviteAdminOrganizationUsersOptions = {
|
|
|
4940
5012
|
* Defaults to true (send an invitation email).
|
|
4941
5013
|
*/
|
|
4942
5014
|
sendInvite?: boolean;
|
|
5015
|
+
/**
|
|
5016
|
+
* Initial password for accounts created by a force add (`sendInvite:
|
|
5017
|
+
* false`); rejected otherwise. 8–128 characters. Only applied to users
|
|
5018
|
+
* without a password yet — an existing credential is never overwritten.
|
|
5019
|
+
*/
|
|
5020
|
+
password?: string;
|
|
4943
5021
|
};
|
|
4944
5022
|
/**
|
|
4945
5023
|
* Per-email outcome of a batch organization invite.
|
|
@@ -5759,42 +5837,6 @@ declare class OrganizationService {
|
|
|
5759
5837
|
removeTeamMember(teamId: string, userId: string): Promise<void>;
|
|
5760
5838
|
}
|
|
5761
5839
|
|
|
5762
|
-
/**
|
|
5763
|
-
* Options for signing in with a social provider (Google or Microsoft).
|
|
5764
|
-
*/
|
|
5765
|
-
type SocialSignInOptions = {
|
|
5766
|
-
/** The social identity provider to authenticate with. */
|
|
5767
|
-
provider: 'google' | 'microsoft';
|
|
5768
|
-
/** URL to redirect to after successful authentication. */
|
|
5769
|
-
callbackURL: string;
|
|
5770
|
-
/** URL to redirect to if authentication fails. Falls back to the API's default error page if not provided. */
|
|
5771
|
-
errorCallbackURL?: string;
|
|
5772
|
-
/** Email address to preselect at the provider, sent as the `login_hint` authorization parameter. */
|
|
5773
|
-
loginHint?: string;
|
|
5774
|
-
};
|
|
5775
|
-
/**
|
|
5776
|
-
* Options for signing in via SAML Single Sign-On.
|
|
5777
|
-
*/
|
|
5778
|
-
type SignInWithSamlOptions = {
|
|
5779
|
-
/** The user's email address, used to resolve the correct SAML identity provider. */
|
|
5780
|
-
email: string;
|
|
5781
|
-
/** URL to redirect to after successful authentication. */
|
|
5782
|
-
callbackURL: string;
|
|
5783
|
-
/** URL to redirect to if authentication fails. Falls back to the API's default error page if not provided. */
|
|
5784
|
-
errorCallbackURL?: string;
|
|
5785
|
-
};
|
|
5786
|
-
/**
|
|
5787
|
-
* Options for signing in with email and password credentials.
|
|
5788
|
-
*/
|
|
5789
|
-
type SignInWithEmailAndPasswordOptions = {
|
|
5790
|
-
/** The user's email address. */
|
|
5791
|
-
email: string;
|
|
5792
|
-
/** The user's password. */
|
|
5793
|
-
password: string;
|
|
5794
|
-
/** URL to redirect to after successful authentication. */
|
|
5795
|
-
callbackURL: string;
|
|
5796
|
-
};
|
|
5797
|
-
|
|
5798
5840
|
/**
|
|
5799
5841
|
* Service for managing user authentication sessions.
|
|
5800
5842
|
*
|
|
@@ -5865,6 +5907,13 @@ declare class SessionService {
|
|
|
5865
5907
|
getToken(): Promise<{
|
|
5866
5908
|
token: string;
|
|
5867
5909
|
}>;
|
|
5910
|
+
/**
|
|
5911
|
+
* Lists the login methods enabled in the environment. Public; safe to call
|
|
5912
|
+
* before authentication to decide which sign-in options to render.
|
|
5913
|
+
*
|
|
5914
|
+
* @returns The enabled login methods
|
|
5915
|
+
*/
|
|
5916
|
+
getLoginMethods(): Promise<("google" | "microsoft" | "password" | "saml" | "otp")[]>;
|
|
5868
5917
|
/**
|
|
5869
5918
|
* Initiates social authentication flow with Google or Microsoft.
|
|
5870
5919
|
*
|
|
@@ -6375,5 +6424,5 @@ declare function validateToken(token: string, apiUrl: string): Promise<boolean>;
|
|
|
6375
6424
|
*/
|
|
6376
6425
|
declare function extractTokenPayload(token: string): DecodedJWTPayload;
|
|
6377
6426
|
|
|
6378
|
-
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, AuthClient, AuthMethod, AuthMethodBrand, AuthMethods, AuthorizationFlowError, DEFAULT_APPLICATION_CONFIG, DEFAULT_JWT_ASSURANCE, DEFAULT_SESSION_ASSURANCE_CONFIG, DeviceAccessDeniedError, DeviceAuthorizationPendingError, DeviceAuthorizationSlowDownError, DeviceCodeExpiredError, DeviceTransientServerError, EmailOTPService, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, JWTPayload, JWTPayloadAssurance, JWTPayloadUser, JWTPayloadWorkspace, OAuthBeginStepUpResponse, OAuthCompleteStepUpResponse, OAuthStepUpProvider, RefreshTokenExpiredError, Roles, SENSITIVE_ACTION_ASSURANCE_POLICY, STEP_UP_MAX_AGE_SECONDS, SendOtpResponse, SessionAssurancePolicy, SessionAssuranceRequiredError, SessionAssuranceRequiredPayload, SessionAssuranceResponse, SessionAssuranceService, StepUpOption, UserNotLoggedInError, ac, assuranceFields, canStepUpWithAmr, createAPIClient, extractTokenPayload, getAalRank, invitationAdditionalFields, isAssuranceSufficientForPolicy, isSessionAssuranceSufficient, isTokenExpired, memberAdditionalFields, mergeStepUpAssurance, organizationAdditionalFields, parseSessionAssuranceRequiredPayload, rolesAccessControl, sessionAssurancePluginClient, userAdditionalFields, validateToken };
|
|
6379
|
-
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeleteAdminOrganizationTeamOptions, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InvitationPasswordSetupResult, InvitationSignupStatus, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, ListOrganizationsOptions, ListOrganizationsWithRoleOptions, Member, NoncePayloadResponse, ExtendedOrganization as Organization, OrganizationSettings, OrganizationWithRole, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, ResendAdminInviteOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, TeamMembersResponse, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateAdminOrganizationTeamOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|
|
6427
|
+
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, AuthClient, AuthMethod, AuthMethodBrand, AuthMethods, AuthorizationFlowError, DEFAULT_APPLICATION_CONFIG, DEFAULT_JWT_ASSURANCE, DEFAULT_SESSION_ASSURANCE_CONFIG, DeviceAccessDeniedError, DeviceAuthorizationPendingError, DeviceAuthorizationSlowDownError, DeviceCodeExpiredError, DeviceTransientServerError, EmailOTPService, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, JWTPayload, JWTPayloadAssurance, JWTPayloadUser, JWTPayloadWorkspace, LOGIN_METHODS, OAuthBeginStepUpResponse, OAuthCompleteStepUpResponse, OAuthStepUpProvider, RefreshTokenExpiredError, Roles, SENSITIVE_ACTION_ASSURANCE_POLICY, STEP_UP_MAX_AGE_SECONDS, SendOtpResponse, SessionAssurancePolicy, SessionAssuranceRequiredError, SessionAssuranceRequiredPayload, SessionAssuranceResponse, SessionAssuranceService, StepUpOption, UserNotLoggedInError, ac, assuranceFields, canStepUpWithAmr, createAPIClient, extractTokenPayload, getAalRank, invitationAdditionalFields, isAssuranceSufficientForPolicy, isSessionAssuranceSufficient, isTokenExpired, memberAdditionalFields, mergeStepUpAssurance, organizationAdditionalFields, parseSessionAssuranceRequiredPayload, rolesAccessControl, sessionAssurancePluginClient, userAdditionalFields, validateToken };
|
|
6428
|
+
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeleteAdminOrganizationTeamOptions, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InvitationPasswordSetupResult, InvitationSignupStatus, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsResponse, ListMembersOptions, ListOrganizationsOptions, ListOrganizationsWithRoleOptions, LoginMethod, LoginMethodsResponse, Member, NoncePayloadResponse, ExtendedOrganization as Organization, OrganizationSettings, OrganizationWithRole, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, ResendAdminInviteOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSamlOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, TeamMembersResponse, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateAdminOrganizationTeamOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|
package/dist/index.mjs
CHANGED
|
@@ -21,7 +21,7 @@ function isTokenExpired(token, expiresInMs) {
|
|
|
21
21
|
return nowInSeconds > expirationTime;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
const version = "1.
|
|
24
|
+
const version = "1.43.0";
|
|
25
25
|
|
|
26
26
|
function parsedEnumValues(schema) {
|
|
27
27
|
return Object.fromEntries(
|
|
@@ -32,10 +32,10 @@ function parsedEnumValues(schema) {
|
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
const AMRBrand = Symbol("amr");
|
|
36
|
-
const AALBrand = Symbol("aal");
|
|
37
|
-
const ACRBrand = Symbol("acr");
|
|
38
|
-
const AuthMethodBrand = Symbol("authMethod");
|
|
35
|
+
const AMRBrand = /* @__PURE__ */ Symbol("amr");
|
|
36
|
+
const AALBrand = /* @__PURE__ */ Symbol("aal");
|
|
37
|
+
const ACRBrand = /* @__PURE__ */ Symbol("acr");
|
|
38
|
+
const AuthMethodBrand = /* @__PURE__ */ Symbol("authMethod");
|
|
39
39
|
const AMR = z.enum({
|
|
40
40
|
Pwd: "pwd",
|
|
41
41
|
Otp: "otp",
|
|
@@ -438,6 +438,21 @@ function sessionAssurancePluginClient() {
|
|
|
438
438
|
};
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
+
function loginMethodsPluginClient() {
|
|
442
|
+
return {
|
|
443
|
+
id: "login-methods",
|
|
444
|
+
getActions: ($fetch) => {
|
|
445
|
+
return {
|
|
446
|
+
loginMethods: {
|
|
447
|
+
get: async () => {
|
|
448
|
+
return await $fetch("/login-methods", { method: "GET" });
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
|
|
441
456
|
function createAPIClient(apiUrl, fetchOptions = {}) {
|
|
442
457
|
const serviceName = typeof process !== "undefined" ? process.env.SERVICE_NAME : "";
|
|
443
458
|
const userAgent = `auth-sdk:core:${version}${serviceName ? `@${serviceName}` : ""}`;
|
|
@@ -465,6 +480,7 @@ function createAPIClient(apiUrl, fetchOptions = {}) {
|
|
|
465
480
|
}),
|
|
466
481
|
applicationsPluginClient(),
|
|
467
482
|
sessionAssurancePluginClient(),
|
|
483
|
+
loginMethodsPluginClient(),
|
|
468
484
|
emailOTPClient()
|
|
469
485
|
],
|
|
470
486
|
fetchOptions: {
|
|
@@ -510,6 +526,8 @@ class AdminService {
|
|
|
510
526
|
this.client = client;
|
|
511
527
|
this.apiUrl = apiUrl;
|
|
512
528
|
}
|
|
529
|
+
client;
|
|
530
|
+
apiUrl;
|
|
513
531
|
/**
|
|
514
532
|
* Requests an application management route.
|
|
515
533
|
*
|
|
@@ -1380,6 +1398,7 @@ class ApplicationService {
|
|
|
1380
1398
|
constructor(client) {
|
|
1381
1399
|
this.client = client;
|
|
1382
1400
|
}
|
|
1401
|
+
client;
|
|
1383
1402
|
/**
|
|
1384
1403
|
* Gets public display context for an application auth redirect.
|
|
1385
1404
|
*
|
|
@@ -1643,6 +1662,7 @@ class OrganizationService {
|
|
|
1643
1662
|
constructor(client) {
|
|
1644
1663
|
this.client = client;
|
|
1645
1664
|
}
|
|
1665
|
+
client;
|
|
1646
1666
|
/**
|
|
1647
1667
|
* Retrieves a single organization by ID with optional related data.
|
|
1648
1668
|
*
|
|
@@ -1922,6 +1942,8 @@ class SessionService {
|
|
|
1922
1942
|
this.client = client;
|
|
1923
1943
|
this.apiUrl = apiUrl;
|
|
1924
1944
|
}
|
|
1945
|
+
client;
|
|
1946
|
+
apiUrl;
|
|
1925
1947
|
/**
|
|
1926
1948
|
* Retrieves the current user session.
|
|
1927
1949
|
*
|
|
@@ -1946,6 +1968,19 @@ class SessionService {
|
|
|
1946
1968
|
async getToken() {
|
|
1947
1969
|
return await this.client.token();
|
|
1948
1970
|
}
|
|
1971
|
+
/**
|
|
1972
|
+
* Lists the login methods enabled in the environment. Public; safe to call
|
|
1973
|
+
* before authentication to decide which sign-in options to render.
|
|
1974
|
+
*
|
|
1975
|
+
* @returns The enabled login methods
|
|
1976
|
+
*/
|
|
1977
|
+
async getLoginMethods() {
|
|
1978
|
+
const response = await this.client.loginMethods.get();
|
|
1979
|
+
if (!response.data) {
|
|
1980
|
+
throw new Error("No data returned from the API", { cause: response.error });
|
|
1981
|
+
}
|
|
1982
|
+
return response.data.loginMethods;
|
|
1983
|
+
}
|
|
1949
1984
|
/**
|
|
1950
1985
|
* Initiates social authentication flow with Google or Microsoft.
|
|
1951
1986
|
*
|
|
@@ -2089,6 +2124,7 @@ class ApiKeyService {
|
|
|
2089
2124
|
constructor(client) {
|
|
2090
2125
|
this.client = client;
|
|
2091
2126
|
}
|
|
2127
|
+
client;
|
|
2092
2128
|
/**
|
|
2093
2129
|
* Creates a new API key.
|
|
2094
2130
|
*
|
|
@@ -2174,6 +2210,7 @@ class EmailOTPService {
|
|
|
2174
2210
|
constructor(client) {
|
|
2175
2211
|
this.client = client;
|
|
2176
2212
|
}
|
|
2213
|
+
client;
|
|
2177
2214
|
/**
|
|
2178
2215
|
* Sends a sign-in verification OTP to an email address.
|
|
2179
2216
|
*
|
|
@@ -2235,6 +2272,7 @@ class SessionAssuranceService {
|
|
|
2235
2272
|
constructor(client) {
|
|
2236
2273
|
this.client = client;
|
|
2237
2274
|
}
|
|
2275
|
+
client;
|
|
2238
2276
|
async get() {
|
|
2239
2277
|
return parseResponse(SessionAssuranceResponse, await this.client.sessionAssurance.getSessionAssurance());
|
|
2240
2278
|
}
|
|
@@ -2259,6 +2297,7 @@ class UserService {
|
|
|
2259
2297
|
constructor(client) {
|
|
2260
2298
|
this.client = client;
|
|
2261
2299
|
}
|
|
2300
|
+
client;
|
|
2262
2301
|
async changePassword(currentPassword, newPassword) {
|
|
2263
2302
|
return await this.client.changePassword({ currentPassword, newPassword, revokeOtherSessions: true });
|
|
2264
2303
|
}
|
|
@@ -2313,6 +2352,8 @@ const ApiKeyMetadata = z.object({
|
|
|
2313
2352
|
}).optional().nullable()
|
|
2314
2353
|
});
|
|
2315
2354
|
|
|
2355
|
+
const LOGIN_METHODS = ["password", "google", "microsoft", "saml", "otp"];
|
|
2356
|
+
|
|
2316
2357
|
class AuthClient {
|
|
2317
2358
|
/**
|
|
2318
2359
|
* Configured Better Auth client used by the public service wrappers.
|
|
@@ -2514,4 +2555,4 @@ function extractTokenPayload(token) {
|
|
|
2514
2555
|
return payload;
|
|
2515
2556
|
}
|
|
2516
2557
|
|
|
2517
|
-
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, AuthClient, AuthMethod, AuthMethodBrand, AuthMethods, AuthorizationFlowError, DEFAULT_APPLICATION_CONFIG, DEFAULT_JWT_ASSURANCE, DEFAULT_SESSION_ASSURANCE_CONFIG, DeviceAccessDeniedError, DeviceAuthorizationPendingError, DeviceAuthorizationSlowDownError, DeviceCodeExpiredError, DeviceTransientServerError, EmailOTPService, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, JWTPayload, JWTPayloadAssurance, JWTPayloadUser, JWTPayloadWorkspace, OAuthStepUpProvider, RefreshTokenExpiredError, Roles, SENSITIVE_ACTION_ASSURANCE_POLICY, STEP_UP_MAX_AGE_SECONDS, SessionAssurancePolicy, SessionAssuranceRequiredError, SessionAssuranceRequiredPayload, SessionAssuranceService, StepUpOption, UserNotLoggedInError, ac, assuranceFields, canStepUpWithAmr, extractTokenPayload, getAalRank, invitationAdditionalFields, isAssuranceSufficientForPolicy, isSessionAssuranceSufficient, isTokenExpired, memberAdditionalFields, mergeStepUpAssurance, organizationAdditionalFields, parseSessionAssuranceRequiredPayload, rolesAccessControl, sessionAssurancePluginClient, userAdditionalFields, validateToken };
|
|
2558
|
+
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, AuthClient, AuthMethod, AuthMethodBrand, AuthMethods, AuthorizationFlowError, DEFAULT_APPLICATION_CONFIG, DEFAULT_JWT_ASSURANCE, DEFAULT_SESSION_ASSURANCE_CONFIG, DeviceAccessDeniedError, DeviceAuthorizationPendingError, DeviceAuthorizationSlowDownError, DeviceCodeExpiredError, DeviceTransientServerError, EmailOTPService, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, JWTPayload, JWTPayloadAssurance, JWTPayloadUser, JWTPayloadWorkspace, LOGIN_METHODS, OAuthStepUpProvider, RefreshTokenExpiredError, Roles, SENSITIVE_ACTION_ASSURANCE_POLICY, STEP_UP_MAX_AGE_SECONDS, SessionAssurancePolicy, SessionAssuranceRequiredError, SessionAssuranceRequiredPayload, SessionAssuranceService, StepUpOption, UserNotLoggedInError, ac, assuranceFields, canStepUpWithAmr, extractTokenPayload, getAalRank, invitationAdditionalFields, isAssuranceSufficientForPolicy, isSessionAssuranceSufficient, isTokenExpired, memberAdditionalFields, mergeStepUpAssurance, organizationAdditionalFields, parseSessionAssuranceRequiredPayload, rolesAccessControl, sessionAssurancePluginClient, userAdditionalFields, validateToken };
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
"name": "@meistrari/auth-core",
|
|
3
|
+
"version": "1.43.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.mjs"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "unbuild",
|
|
18
|
+
"docs": "typedoc"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@better-auth/api-key": "1.6.26",
|
|
22
|
+
"@better-auth/sso": "1.6.26",
|
|
23
|
+
"better-auth": "1.6.26",
|
|
24
|
+
"jose": "6.1.3",
|
|
25
|
+
"zod": "4.3.6"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "latest",
|
|
29
|
+
"typedoc": "0.28.18",
|
|
30
|
+
"typedoc-plugin-markdown": "4.11.0",
|
|
31
|
+
"typescript": "5.9.2",
|
|
32
|
+
"unbuild": "3.6.1"
|
|
9
33
|
}
|
|
10
|
-
},
|
|
11
|
-
"main": "./dist/index.mjs",
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
|
-
"files": [
|
|
14
|
-
"dist"
|
|
15
|
-
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "unbuild",
|
|
18
|
-
"docs": "typedoc"
|
|
19
|
-
},
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"@better-auth/api-key": "1.6.26",
|
|
22
|
-
"@better-auth/sso": "1.6.26",
|
|
23
|
-
"better-auth": "1.6.26",
|
|
24
|
-
"jose": "6.1.3",
|
|
25
|
-
"zod": "4.3.6"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@types/node": "latest",
|
|
29
|
-
"typedoc": "0.28.18",
|
|
30
|
-
"typedoc-plugin-markdown": "4.11.0",
|
|
31
|
-
"typescript": "5.9.2",
|
|
32
|
-
"unbuild": "3.6.1"
|
|
33
|
-
}
|
|
34
34
|
}
|