Skip to content

backends-web-backend


Class: AuthController

Defined in: backends/web-backend/src/auth/auth.controller.ts:25

Constructors

Constructor

new AuthController(authService): AuthController

Defined in: backends/web-backend/src/auth/auth.controller.ts:26

Parameters

authService

AuthService

Returns

AuthController

Methods

availability()

availability(username?, email?): Promise<{ emailAvailable?: boolean; usernameAvailable?: boolean; }>

Defined in: backends/web-backend/src/auth/auth.controller.ts:78

Parameters

username?

string

email?

string

Returns

Promise<{ emailAvailable?: boolean; usernameAvailable?: boolean; }>


forgotPassword()

forgotPassword(body): Promise<{ detail: string; }>

Defined in: backends/web-backend/src/auth/auth.controller.ts:62

Parameters

body
identifier

string = ...

Returns

Promise<{ detail: string; }>


login()

login(body, req): Promise<{ token: string; } | { challengeToken: string; twoFactorRequired: true; }>

Defined in: backends/web-backend/src/auth/auth.controller.ts:36

Parameters

body
identifier

string = ...

password

string = ...

req

Request

Returns

Promise<{ token: string; } | { challengeToken: string; twoFactorRequired: true; }>


loginTwoFactor()

loginTwoFactor(body, req): Promise<{ token: string; } | { challengeToken: string; twoFactorRequired: true; }>

Defined in: backends/web-backend/src/auth/auth.controller.ts:45

Parameters

body
challengeToken

string = ...

code

string = ...

req

Request

Returns

Promise<{ token: string; } | { challengeToken: string; twoFactorRequired: true; }>


logout()

logout(req): Promise<{ detail: string; }>

Defined in: backends/web-backend/src/auth/auth.controller.ts:55

Parameters

req

AuthenticatedRequest

Returns

Promise<{ detail: string; }>


oauthCallback()

oauthCallback(provider, req, res, code?, state?): Promise<void>

Defined in: backends/web-backend/src/auth/auth.controller.ts:103

Parameters

provider

string

req

Request

res

Response

code?

string

state?

string

Returns

Promise<void>


oauthStart()

oauthStart(provider, res, intent?, token?, campaignToken?, visitorId?): Promise<void>

Defined in: backends/web-backend/src/auth/auth.controller.ts:86

Parameters

provider

string

res

Response

intent?

string

token?

string

campaignToken?

string

visitorId?

string

Returns

Promise<void>


resetPassword()

resetPassword(body): Promise<{ detail: string; }>

Defined in: backends/web-backend/src/auth/auth.controller.ts:70

Parameters

body
newPassword

string = ...

token

string = ...

Returns

Promise<{ detail: string; }>


signup()

signup(body): Promise<{ email: string; id: string; username: string; }>

Defined in: backends/web-backend/src/auth/auth.controller.ts:30

Parameters

body
campaignToken?

string = ...

email

string = ...

fullName

string = ...

organization

string = ...

password

string = ...

username

string = ...

visitorId?

string = ...

Returns

Promise<{ email: string; id: string; username: string; }>