// SOFTWARE

Auth API

The Vapor backend behind Auth — JWT issuance, refresh, and account lifecycle for email, Apple, Google, and guest sign-in.

[API][MVP-PUBLISHED]v1.0.1
Loading…LAN ONLY

Getting Started

Getting Started

Auth API is the Vapor server-side of the Auth Swift Package. A host app adds Auth as a package dependency, registers each RouteCollection (AuthController, RefreshTokenController, LogoutController, GuestAuthController, UpgradeController, AppleAuthController, GoogleAuthController, ForgotPasswordController, ResetPasswordController, ChangePasswordController, AccountDeletionController) against its Vapor Application, and supplies its own Fluent database driver — Auth itself stays driver-agnostic.

Authentication

Most endpoints are public: registration, login, refresh, social sign-in, guest sign-in, forgot-password, and reset-password. Endpoints that act on an existing session — logout, guest upgrade, change password, account deletion, and the profile lookup — require a Bearer JWT access token issued by one of the sign-in endpoints, verified by JWTMiddleware.

Reference server

The endpoints below are demonstrated end-to-end by the bundled demo/api Vapor app, which stores data in SQLite for local development and is started with swift run from demo/api.

Swift 6.2Vapor 4Fluent (driver-agnostic)JWTKitBCrypt