-
Declaration
Swift
func registerRoutes(_ app: Application) throws
-
Declaration
Swift
struct LoginPageContext : Encodable -
Declaration
Swift
struct UserCreatedContext : Encodable -
loginPageViewHandler(_:Asynchronous) GET /loginGET /logoutWhen the caller is a logged-in user with a session token, this shows a logout page. When the caller is not logged-in, this shows a login page.
Declaration
Swift
func loginPageViewHandler(_ req: Request) async throws -> View -
loginPagePostHandler(_:Asynchronous)
See morePOST /loginDeclaration
Swift
func loginPagePostHandler(_ req: Request) async throws -> View -
loginPageLogoutHandler(_:Asynchronous) POST /logout** Form Submission Parameters**
allaccounts=true- Logs the user out of all sessions by removing the user’s auth token.
There’s a single URL for login/logout; it shows you the right page depending on your current login status. The logout form shows the user who they’re logged in as, and has a single ‘Logout’ button.
See moreDeclaration
Swift
func loginPageLogoutHandler(_ req: Request) async throws -> View -
createAccountPageHandler(_:Asynchronous) GET /createAccountShows the Account Creation form if not logged in. For logged-in users this shows the Logout form.
Declaration
Swift
func createAccountPageHandler(_ req: Request) async throws -> View -
createAccountPostHandler(_:Asynchronous) Declaration
Swift
func createAccountPostHandler(_ req: Request) async throws -> View -
resetPasswordViewHandler(_:Asynchronous) GET /resetPasswordShows the Reset Password page. Uses password update if you’re logged in, else uses the recover password flow.
Declaration
Swift
func resetPasswordViewHandler(_ req: Request) async throws -> View -
resetPasswordPostHandler(_:Asynchronous)
See morePOST /resetPasswordDeclaration
Swift
func resetPasswordPostHandler(_ req: Request) async throws -> View -
recoverPasswordPostHandler(_:Asynchronous) POST /recoverPasswordChange password for logged-out user, using regcode, current password, or recovery code.
See moreDeclaration
Swift
func recoverPasswordPostHandler(_ req: Request) async throws -> View -
codeOfConductViewHandler(_:Asynchronous) GET /codeOfConductGET /conductAgreeShows the CoC page, which is a render of a Markdown source.
Query Options: * ?boxed=true Removes the site header navbar; useful for apps that want to show this page but not allow general site nav.
Declaration
Swift
func codeOfConductViewHandler(_ req: Request) async throws -> View -
createAltAccountViewHandler(_:Asynchronous) GET /createAltAccountMust be logged in, although you can be logged in as an alt account, in which case this method creates another alt as a child of the parent account. All accounts are parents or children, never both.
Declaration
Swift
func createAltAccountViewHandler(_ req: Request) async throws -> View -
createAltAccountPostHandler(_:Asynchronous)
See morePOST /createAltAccountDeclaration
Swift
func createAltAccountPostHandler(_ req: Request) async throws -> View
-
loginUser(with:Asynchronouson: defaultDeviceType: ) Declaration
Swift
func loginUser(with tokenResponse: TokenStringData, on req: Request, defaultDeviceType: String = "unknown device") async throws
View on GitHub