-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from ribeirogab/feature/magic-link-login
Feature/magic link login
- Loading branch information
Showing
42 changed files
with
334 additions
and
493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
# Application | ||
# Environment | ||
NODE_ENV=development | ||
STAGE=dev | ||
JWT_SECRET=secret | ||
|
||
# Application | ||
JWT_SECRET=auth-jwt-secret | ||
JWT_SECRET_VERIFICATION_TOKEN=verification-token-jwt-secret | ||
|
||
# AWS | ||
AWS_REGION=us-east-1 | ||
AWS_DYNAMO_TABLE_NAME=dev-authentication | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './unique-id'; | ||
export * from './logger'; | ||
export * from './email'; | ||
export * from './hash'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
export * from './registration.controller'; | ||
export * from './password.controller'; | ||
export * from './auth.controller'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
import type { HttpStatusCodesEnum } from '@/constants'; | ||
import { AppErrorCodeEnum, type HttpStatusCodesEnum } from '@/constants'; | ||
|
||
export type AppErrorConstructor = { | ||
status_code: HttpStatusCodesEnum; | ||
error_code?: AppErrorCodeEnum; | ||
details?: unknown; | ||
message: string; | ||
}; | ||
|
||
export class AppError extends Error { | ||
public readonly status_code: HttpStatusCodesEnum; | ||
public readonly error_code?: AppErrorCodeEnum; | ||
public readonly details?: unknown; | ||
|
||
constructor({ message, status_code, details }: AppErrorConstructor) { | ||
constructor({ | ||
error_code = AppErrorCodeEnum.Unknown, | ||
status_code, | ||
message, | ||
details, | ||
}: AppErrorConstructor) { | ||
super(message); | ||
this.status_code = status_code; | ||
this.error_code = error_code; | ||
this.details = details; | ||
} | ||
} |
Oops, something went wrong.