feat: reset password cli (#903)
* feat: add password reset cli * feat: add homarr cli to docker image
This commit is contained in:
1 parent
ca1ecdf848
commit
7fa5e70d5b
16 files changed
+193
-7
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { randomUUID } from "crypto";
|
||||
import type { Session } from "next-auth";
|
||||
|
||||
import { generateSecureRandomToken } from "@homarr/common/server";
|
||||
import type { Database } from "@homarr/db";
|
||||
|
||||
import { getCurrentUserPermissionsAsync } from "./callbacks";
|
||||
@@ -13,7 +13,7 @@ export const expireDateAfter = (seconds: number) => {
|
||||
};
|
||||
|
||||
export const generateSessionToken = () => {
|
||||
return randomUUID();
|
||||
return generateSecureRandomToken(48);
|
||||
};
|
||||
|
||||
export const getSessionFromTokenAsync = async (db: Database, token: string | undefined): Promise<Session | null> => {
|
||||
|
||||
Reference in new issue
Block a user