Add password strength indicator and use crypto safe random PWs

This commit is contained in:
Manuel
2023-08-01 17:42:19 +02:00
parent b4c6896850
commit 2035b20690
6 changed files with 158 additions and 35 deletions

View File

@@ -0,0 +1,17 @@
import { generate } from 'generate-password';
import { createTRPCRouter, publicProcedure } from "../trpc";
export const passwordRouter = createTRPCRouter({
generate: publicProcedure.mutation(() => {
return generate({
strict: true,
numbers: true,
lowercase: true,
uppercase: true,
symbols: true,
excludeSimilarCharacters: true,
length: 16
})
}),
});