A Vapor middleware for adding federated authentication with OAuth providers to Swift server applications.
Imperial is a Swift package that provides federated authentication with OAuth providers for Vapor applications. It simplifies integrating external login services like GitHub by handling the OAuth flow, token storage, and route protection, allowing developers to offload user authentication to trusted third-party providers.
Swift developers building server-side applications with the Vapor framework who need to implement secure, federated user authentication without managing user credentials directly.
Developers choose Imperial because it offers a Vapor-native, middleware-based solution that reduces the boilerplate and complexity of implementing OAuth, with built-in session management and route protection tailored for Swift server environments.
Federated Authentication with OAuth providers
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Tailored for Vapor's ecosystem, using its sessions middleware and routing system, as shown in the README's configuration examples for easy setup.
Includes modules like ImperialGitHub for quick integration with external services, reducing boilerplate code for OAuth implementation.
Offers ImperialMiddleware to guard routes with minimal code, ensuring only authenticated users access protected endpoints, as demonstrated in the grouped routes example.
Allows custom logic or simple redirects in OAuth callbacks, giving developers control over post-authentication flows, as highlighted in the route registration options.
Exclusively tied to the Vapor framework, making it incompatible with other Swift server environments or non-Swift projects, limiting its portability.
Relies on Vapor's sessions for token storage, which may not suit stateless APIs or applications preferring JWT or other token-based approaches without server sessions.
As a vapor-community project, it might have slower updates or less official support compared to core Vapor packages, potentially affecting long-term reliability.