Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

fix(client, auth): explicitly return client methods instead of spreading proxy object (#152)

Corentin Thomassete92456bc6b1a
diff --git a/apps/papra-client/src/modules/auth/auth.services.ts b/apps/papra-client/src/modules/auth/auth.services.ts
index a8003330..269c3c7f 100644
--- a/apps/papra-client/src/modules/auth/auth.services.ts
+++ b/apps/papra-client/src/modules/auth/auth.services.ts
@@ -12,7 +12,14 @@ export function createAuthClient() {
});
return {
- ...client,
+ // we can't spread the client because it is a proxy object
+ signIn: client.signIn,
+ signUp: client.signUp,
+ forgetPassword: client.forgetPassword,
+ resetPassword: client.resetPassword,
+ sendVerificationEmail: client.sendVerificationEmail,
+ useSession: client.useSession,
+ organization: client.organization,
signOut: async () => {
trackingServices.capture({ event: 'User logged out' });
const result = await client.signOut();