Ajoute le flux d'invitation avec activation de compte
This commit is contained in:
Vendored
+19
-1
@@ -76,6 +76,18 @@ declare function createAuthModule<TAuthUser>(options: CreateAuthModuleOptions<TA
|
||||
slackAuthEnabled: boolean;
|
||||
};
|
||||
|
||||
type AccountInviteOptions = {
|
||||
prisma: any;
|
||||
tokenTtlMs?: number;
|
||||
identifierPrefix?: string;
|
||||
};
|
||||
declare function createAccountInviteToken(options: AccountInviteOptions & {
|
||||
userId: string;
|
||||
}): Promise<{
|
||||
token: string;
|
||||
expiresAt: Date;
|
||||
}>;
|
||||
|
||||
type RegisterAuthApiRoutesOptions = {
|
||||
app: Express;
|
||||
prisma: any;
|
||||
@@ -110,6 +122,10 @@ type RegisterAuthApiRoutesOptions = {
|
||||
expiresAt: Date;
|
||||
}) => Promise<void>;
|
||||
};
|
||||
accountInvite?: {
|
||||
enabled: boolean;
|
||||
identifierPrefix?: string;
|
||||
};
|
||||
onUserRegistered?: (user: {
|
||||
id: string;
|
||||
email: string | null;
|
||||
@@ -130,7 +146,9 @@ type AuthRouteMessages = {
|
||||
passwordResetUnavailable: string;
|
||||
invalidResetLink: string;
|
||||
expiredResetLink: string;
|
||||
invalidInviteLink: string;
|
||||
inviteAlreadyAccepted: string;
|
||||
};
|
||||
declare function registerAuthApiRoutes(options: RegisterAuthApiRoutesOptions): void;
|
||||
|
||||
export { createAuthModule, registerAuthApiRoutes };
|
||||
export { createAccountInviteToken, createAuthModule, registerAuthApiRoutes };
|
||||
|
||||
Reference in New Issue
Block a user