-
Declaration
Swift
func registerRoutes(_ app: Application) throws
-
Declaration
Swift
struct LoginPageContext : Encodable
-
Declaration
Swift
struct UserCreatedContext : Encodable
-
loginPageViewHandler(_:
Asynchronous) GET /login
GET /logout
When 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 /login
Declaration
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 /createAccount
Shows 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 /resetPassword
Shows 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 /resetPassword
Declaration
Swift
func resetPasswordPostHandler(_ req: Request) async throws -> View
-
recoverPasswordPostHandler(_:
Asynchronous) POST /recoverPassword
Change password for logged-out user, using regcode, current password, or recovery code.
See moreDeclaration
Swift
func recoverPasswordPostHandler(_ req: Request) async throws -> View
-
codeOfConductViewHandler(_:
Asynchronous)
See moreGET /codeOfConduct
GET /conductAgree
Declaration
Swift
func codeOfConductViewHandler(_ req: Request) async throws -> View
-
createAltAccountViewHandler(_:
Asynchronous) GET /createAltAccount
Must 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 /createAltAccount
Declaration
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