mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 03:32:14 +10:00
fix: wip
This commit is contained in:
@ -22,7 +22,6 @@ export type SessionUser = Pick<
|
||||
| 'twoFactorEnabled'
|
||||
| 'roles'
|
||||
| 'signature'
|
||||
| 'url'
|
||||
| 'customerId'
|
||||
>;
|
||||
|
||||
@ -99,7 +98,6 @@ export const validateSessionToken = async (token: string): Promise<SessionValida
|
||||
twoFactorEnabled: true,
|
||||
roles: true,
|
||||
signature: true,
|
||||
url: true,
|
||||
customerId: true,
|
||||
},
|
||||
},
|
||||
|
||||
@ -2,7 +2,6 @@ import { UserSecurityAuditLogType } from '@prisma/client';
|
||||
import { OAuth2Client, decodeIdToken } from 'arctic';
|
||||
import type { Context } from 'hono';
|
||||
import { deleteCookie } from 'hono/cookie';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
import { AppError, AppErrorCode } from '@documenso/lib/errors/app-error';
|
||||
import { onCreateUserHook } from '@documenso/lib/server-only/user/create-user';
|
||||
@ -164,7 +163,6 @@ export const handleOAuthCallbackUrl = async (options: HandleOAuthCallbackUrlOpti
|
||||
email: email,
|
||||
name: name,
|
||||
emailVerified: new Date(),
|
||||
url: nanoid(17),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ import { getMostRecentVerificationTokenByUserId } from '@documenso/lib/server-on
|
||||
import { resetPassword } from '@documenso/lib/server-only/user/reset-password';
|
||||
import { updatePassword } from '@documenso/lib/server-only/user/update-password';
|
||||
import { verifyEmail } from '@documenso/lib/server-only/user/verify-email';
|
||||
import { alphaid } from '@documenso/lib/universal/id';
|
||||
import { env } from '@documenso/lib/utils/env';
|
||||
import { prisma } from '@documenso/prisma';
|
||||
|
||||
@ -156,7 +157,12 @@ export const emailPasswordRoute = new Hono<HonoAuthContext>()
|
||||
});
|
||||
}
|
||||
|
||||
const user = await createUser({ name, email, password, signature, url });
|
||||
const orgUrl = url || alphaid(12);
|
||||
|
||||
const user = await createUser({ name, email, password, signature, orgUrl }).catch((err) => {
|
||||
console.error(err);
|
||||
throw err;
|
||||
});
|
||||
|
||||
await jobsClient.triggerJob({
|
||||
name: 'send.signup.confirmation.email',
|
||||
|
||||
Reference in New Issue
Block a user