mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-17 04:33:15 +02:00
* Working on some initial prototype stuff for TOTP * Fixed a bug that prevented the change password menu from working * Enable/disable totp working * Added the new login procedure including TOTP! :) * misc: Changed bad description for the TOTP_SECRET env var * I forgot to include the migration for the new prisma stuff * fix: refresh user context instead refreshing the page * refactor: simplify totp error handling * Removed U2F tab + format schema * fix: tokens not saved in cookies * refactor: deleted commented out code * refactor: move password text to input description * refactor: remove tabler icon package Co-authored-by: Elias Schneider <login@eliasschneider.com> Co-authored-by: Elias Schneider <58886915+stonith404@users.noreply.github.com>
22 lines
418 B
TypeScript
22 lines
418 B
TypeScript
import { PickType } from "@nestjs/mapped-types";
|
|
import { IsEmail, IsOptional, IsString } from "class-validator";
|
|
import { UserDTO } from "src/user/dto/user.dto";
|
|
|
|
export class AuthSignInTotpDTO extends PickType(UserDTO, [
|
|
"password",
|
|
] as const) {
|
|
@IsEmail()
|
|
@IsOptional()
|
|
email: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
username: string;
|
|
|
|
@IsString()
|
|
totp: string;
|
|
|
|
@IsString()
|
|
loginToken: string;
|
|
}
|