Skip to content

AccountController

AccountController exposes account login, reauthentication, and removal to the frontend. It stays limited to DTO conversion and feature invocation.

  • Methods: 8
  • Referenced types: 2

Methods

CancelLogin

CancelLogin discards a pending sign-in flow.

Go

go
CancelLogin(flowID string) error

TypeScript

ts
CancelLogin(flowID: string): Promise<void>

Parameters

NameType
flowIDstring

Example

ts
await CancelLogin("flow-id")

Source

internal/transport/wails/account_controller.go:41

CompleteTOTP

CompleteTOTP finishes a sign-in flow with the user's one-time verification code.

Go

go
CompleteTOTP(flowID string, code string) (LoginResultDTO, error)

TypeScript

ts
CompleteTOTP(flowID: string, code: string): Promise<LoginResultDTO>

Parameters

NameType
flowIDstring
codestring

Returns

Go typeTypeScript type
LoginResultDTOLoginResultDTO

Example

ts
const completeTOTP = await CompleteTOTP("flow-id", "")

Source

internal/transport/wails/account_controller.go:35

ListAccounts

ListAccounts returns the launcher's saved accounts for account selection.

Go

go
ListAccounts() ([]AccountDTO, error)

TypeScript

ts
ListAccounts(): Promise<AccountDTO[]>

Returns

Go typeTypeScript type
[]AccountDTOAccountDTO[]

Example

ts
const listAccounts = await ListAccounts()

Source

internal/transport/wails/account_controller.go:19

Login

Login starts an account sign-in flow and reports whether further verification is required.

Go

go
Login(email string, password string) (LoginResultDTO, error)

TypeScript

ts
Login(email: string, password: string): Promise<LoginResultDTO>

Parameters

NameType
emailstring
passwordstring

Returns

Go typeTypeScript type
LoginResultDTOLoginResultDTO

Example

ts
const login = await Login("user@example.com", "")

Source

internal/transport/wails/account_controller.go:29

ReauthenticateAccount

ReauthenticateAccount refreshes authentication for an existing saved account.

Go

go
ReauthenticateAccount(accountID string, email string, password string) (LoginResultDTO, error)

TypeScript

ts
ReauthenticateAccount(accountID: string, email: string, password: string): Promise<LoginResultDTO>

Parameters

NameType
accountIDstring
emailstring
passwordstring

Returns

Go typeTypeScript type
LoginResultDTOLoginResultDTO

Example

ts
const reauthenticateAccount = await ReauthenticateAccount("account-id", "user@example.com", "")

Source

internal/transport/wails/account_controller.go:62

RemoveAccount

RemoveAccount removes a saved account and its protected credentials.

Go

go
RemoveAccount(id string) error

TypeScript

ts
RemoveAccount(id: string): Promise<void>

Parameters

NameType
idstring

Example

ts
await RemoveAccount("id")

Source

internal/transport/wails/account_controller.go:51

SetDefaultAccount

SetDefaultAccount selects the account used for future game launches.

Go

go
SetDefaultAccount(id string) error

TypeScript

ts
SetDefaultAccount(id: string): Promise<void>

Parameters

NameType
idstring

Example

ts
await SetDefaultAccount("id")

Source

internal/transport/wails/account_controller.go:46

ValidateAccount

ValidateAccount checks whether a saved account can still authenticate.

Go

go
ValidateAccount(id string) (AccountDTO, error)

TypeScript

ts
ValidateAccount(id: string): Promise<AccountDTO>

Parameters

NameType
idstring

Returns

Go typeTypeScript type
AccountDTOAccountDTO

Example

ts
const validateAccount = await ValidateAccount("id")

Source

internal/transport/wails/account_controller.go:56