mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-26 16:30:57 +01:00
feat: reset password cli (#903)
* feat: add password reset cli * feat: add homarr cli to docker image
This commit is contained in:
10
packages/common/src/security.ts
Normal file
10
packages/common/src/security.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { randomBytes } from "crypto";
|
||||
|
||||
/**
|
||||
* Generates a random hex token twice the size of the given size
|
||||
* @param size amount of bytes to generate
|
||||
* @returns a random hex token twice the length of the given size
|
||||
*/
|
||||
export const generateSecureRandomToken = (size: number) => {
|
||||
return randomBytes(size).toString("hex");
|
||||
};
|
||||
1
packages/common/src/server.ts
Normal file
1
packages/common/src/server.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./security";
|
||||
Reference in New Issue
Block a user