Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
userId: user.id,
details: {
hash: await hash(password, authority.details.rounds)
}
});
const role = new Role({
id: v4(),
enabled: true,
name: "Super Administrator",
description: "A super administrator has full access to all resources.",
scopes: ["**:**:**"],
userIds: [user.id]
});
const authorization = new Authorization({
id: v4(),
enabled: true,
scopes: ["**:**:**"],
userId: user.id,
grantId: null,
secret: randomBytes(16).toString("hex")
});
console.log(JSON.stringify({ id: user.id, password: password }));
try {
await tx.query("BEGIN DEFERRABLE");
await bootstrap(tx, {
user: {
data: user,