@finueva/auth 0.16.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/dist/device.d.ts +3 -2
- package/dist/device.js +117 -39
- package/dist/index.d.ts +2 -2
- package/dist/index.js +107 -8
- package/dist/server.d.ts +26 -2
- package/dist/server.js +2428 -1169
- package/dist/{types-Dpy17xNC.d.ts → types-CqFT4G95.d.ts} +13 -1
- package/package.json +4 -2
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
//#region src/user-api/credential.d.ts
|
|
2
|
+
interface UserApiCredentialInput {
|
|
3
|
+
applicationId: string;
|
|
4
|
+
forceRefresh?: boolean;
|
|
5
|
+
}
|
|
6
|
+
interface UserApiCredential {
|
|
7
|
+
tokenType: "Bearer";
|
|
8
|
+
token: string;
|
|
9
|
+
expiresAt: Date;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
1
12
|
//#region src/errors.d.ts
|
|
2
13
|
type AuthErrorCode = "invalid_credentials" | "invalid_auth_input" | "account_conflict" | "password_reset_invalid" | "authentication_required" | "request_origin_denied" | "invalid_request" | "invalid_invitation" | "invitation_unavailable" | "recipient_unavailable" | "invitation_recipient_mismatch" | "invitation_recovery_required" | "email_verification_required" | "invalid_workspace_selection" | "organization_context_too_large" | "credential_rate_limited" | "auth_request_rate_limited" | "state_conflict" | "access_denied" | "platform_target_unavailable" | "platform_quorum_unavailable" | "platform_recovery_required" | "identity_authority_unavailable";
|
|
3
14
|
type AuthErrorStatus = 400 | 401 | 403 | 404 | 405 | 409 | 413 | 415 | 422 | 429 | 503;
|
|
@@ -318,8 +329,9 @@ interface FinuevaAuthClient {
|
|
|
318
329
|
resetPassword(token: string, newPassword: string): Promise<void>;
|
|
319
330
|
signOut(): Promise<void>;
|
|
320
331
|
getDriveCredential(input: DriveCredentialInput): Promise<DriveCredential>;
|
|
332
|
+
getUserApiCredential(input: UserApiCredentialInput): Promise<UserApiCredential>;
|
|
321
333
|
onAuthStateChange(listener: (state: AuthState) => void): () => void;
|
|
322
334
|
onSessionChange(listener: (session: AuthSession | null) => void): () => void;
|
|
323
335
|
}
|
|
324
336
|
//#endregion
|
|
325
|
-
export { PersonalWorkspaceSelection as A, RecentAuthenticationStatus as B, OrganizationPage as C, OrganizationTeamMemberPage as D, OrganizationTeamDisplay as E, PlatformRoleChangeRecentAuthenticationInput as F, SocialIdTokenProvider as G, SendVerificationEmailInput as H, PlatformRoleFirstApproval as I, UpdateProfileInput as J, UpdateOrganizationDisplayInput as K, PlatformStatus as L, PlatformRole as M, PlatformRoleApplied as N, OrganizationTeamPage as O, PlatformRoleApproval as P, AuthErrorStatus as Q, ReceivedOrganizationInvitation as R, OrganizationMemberPage as S, OrganizationTeam as T, SignInInput as U, ResentOrganizationInvitation as V, SocialIdTokenInput as W, AuthError as X, WorkspaceSelection as Y, AuthErrorCode as Z, OrganizationDisplay as _, AuthPersistenceDriver as a, OrganizationMember as b, AuthUser as c, CreatedOrganizationMemberInvitation as d, CreatedOrganizationTeam as f, InvitationAcceptance as g, FinuevaAuthClient as h, AuthPersistence as i, PlatformBootstrapRoleChangeInput as j, OrganizationWorkspaceSelection as k, CanceledOrganizationInvitation as l, DriveCredentialInput as m, AuthClientOptions as n, AuthSession as o, DriveCredential as p, UpdateOrganizationTeamDisplayInput as q, AuthOrganization as r, AuthState as s, AcceptInvitationInput as t, CreateOrganizationMemberInvitationInput as u, OrganizationInvitation as v, OrganizationPageInput as w, OrganizationMemberAuthority as x, OrganizationInvitationPage as y, ReceivedOrganizationInvitationPage as z };
|
|
337
|
+
export { UserApiCredential as $, PersonalWorkspaceSelection as A, RecentAuthenticationStatus as B, OrganizationPage as C, OrganizationTeamMemberPage as D, OrganizationTeamDisplay as E, PlatformRoleChangeRecentAuthenticationInput as F, SocialIdTokenProvider as G, SendVerificationEmailInput as H, PlatformRoleFirstApproval as I, UpdateProfileInput as J, UpdateOrganizationDisplayInput as K, PlatformStatus as L, PlatformRole as M, PlatformRoleApplied as N, OrganizationTeamPage as O, PlatformRoleApproval as P, AuthErrorStatus as Q, ReceivedOrganizationInvitation as R, OrganizationMemberPage as S, OrganizationTeam as T, SignInInput as U, ResentOrganizationInvitation as V, SocialIdTokenInput as W, AuthError as X, WorkspaceSelection as Y, AuthErrorCode as Z, OrganizationDisplay as _, AuthPersistenceDriver as a, OrganizationMember as b, AuthUser as c, CreatedOrganizationMemberInvitation as d, UserApiCredentialInput as et, CreatedOrganizationTeam as f, InvitationAcceptance as g, FinuevaAuthClient as h, AuthPersistence as i, PlatformBootstrapRoleChangeInput as j, OrganizationWorkspaceSelection as k, CanceledOrganizationInvitation as l, DriveCredentialInput as m, AuthClientOptions as n, AuthSession as o, DriveCredential as p, UpdateOrganizationTeamDisplayInput as q, AuthOrganization as r, AuthState as s, AcceptInvitationInput as t, CreateOrganizationMemberInvitationInput as u, OrganizationInvitation as v, OrganizationPageInput as w, OrganizationMemberAuthority as x, OrganizationInvitationPage as y, ReceivedOrganizationInvitationPage as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finueva/auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Public browser and server SDK for Finueva Auth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -42,10 +42,11 @@
|
|
|
42
42
|
"coverage": "vitest run --coverage",
|
|
43
43
|
"lint": "oxlint . --deny-warnings",
|
|
44
44
|
"prepack": "pnpm build",
|
|
45
|
-
"test": "pnpm test:unit && pnpm build && pnpm test:package",
|
|
45
|
+
"test": "pnpm test:unit && pnpm build && pnpm test:package && pnpm test:user-api",
|
|
46
46
|
"test:composition": "node scripts/test/composition/runner.mjs",
|
|
47
47
|
"test:package": "node scripts/test/package.mjs",
|
|
48
48
|
"test:unit": "vitest run",
|
|
49
|
+
"test:user-api": "node scripts/test/user-api.mjs",
|
|
49
50
|
"typecheck": "tsc --noEmit"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"@typescript/native": "npm:typescript@7.0.2",
|
|
57
58
|
"@vitest/coverage-v8": "4.1.10",
|
|
58
59
|
"better-auth": "1.6.22",
|
|
60
|
+
"jose": "6.2.4",
|
|
59
61
|
"miniflare": "4.20260722.0",
|
|
60
62
|
"ofetch": "1.5.1",
|
|
61
63
|
"playwright": "1.62.0",
|