mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-25 22:36:38 +00:00
allow using password to log in if security keys are available
This commit is contained in:
@@ -106,21 +106,21 @@ export async function login(
|
||||
);
|
||||
}
|
||||
|
||||
// Check if user has security keys registered
|
||||
const userSecurityKeys = await db
|
||||
.select()
|
||||
.from(securityKeys)
|
||||
.where(eq(securityKeys.userId, existingUser.userId));
|
||||
|
||||
if (userSecurityKeys.length > 0) {
|
||||
return response<LoginResponse>(res, {
|
||||
data: { useSecurityKey: true },
|
||||
success: true,
|
||||
error: false,
|
||||
message: "Security key authentication required",
|
||||
status: HttpCode.OK
|
||||
});
|
||||
}
|
||||
// // Check if user has security keys registered
|
||||
// const userSecurityKeys = await db
|
||||
// .select()
|
||||
// .from(securityKeys)
|
||||
// .where(eq(securityKeys.userId, existingUser.userId));
|
||||
//
|
||||
// if (userSecurityKeys.length > 0) {
|
||||
// return response<LoginResponse>(res, {
|
||||
// data: { useSecurityKey: true },
|
||||
// success: true,
|
||||
// error: false,
|
||||
// message: "Security key authentication required",
|
||||
// status: HttpCode.OK
|
||||
// });
|
||||
// }
|
||||
|
||||
if (
|
||||
existingUser.twoFactorSetupRequested &&
|
||||
|
||||
@@ -229,7 +229,7 @@ export async function createOrgDomain(
|
||||
|
||||
// TODO: This needs to be cross region and not hardcoded
|
||||
if (type === "ns") {
|
||||
nsRecords = config.getRawConfig().dns.nameservers;
|
||||
nsRecords = config.getRawConfig().dns.nameservers as string[];
|
||||
} else if (type === "cname") {
|
||||
cnameRecords = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user