Logo
Explore Help
Sign In
swissmakers_gmbh/swiss-datashare
12
0
Fork 0
You've already forked swiss-datashare
mirror of https://github.com/swissmakers/swiss-datashare.git synced 2026-04-17 12:43:13 +02:00
Code Issues Actions Packages Projects Releases Wiki Activity
Files
16480f6e9572011fadeb981a388b92cb646fa6d9
swiss-datashare/backend/src/auth/dto/authSignInTotp.dto.ts

22 lines
418 B
TypeScript
Raw Normal View History

feat: TOTP (two-factor) Authentication (#55) * 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>
2022-12-21 11:58:37 -05:00
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;
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.5 Page: 31ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API