Go library providing chainable HTTP handlers for OAuth1 and OAuth2 authentication with major providers.
gologin is a Go package that provides chainable http.Handler implementations for implementing authentication flows with OAuth1 and OAuth2 providers like Google, GitHub, Twitter, and Facebook. It simplifies adding social login to Go web applications by handling the low-level details of OAuth protocols while remaining flexible and customizable.
Go developers building web applications or APIs that require social login functionality, particularly those who prefer a modular, handler-based approach over monolithic authentication frameworks.
Developers choose gologin for its emphasis on small, chainable handlers that keep authentication orthogonal to session management, allowing easy customization through standard Go http.Handler and context patterns without imposing a specific session system.
Go login handlers for authentication providers (OAuth1, OAuth2)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses chainable HTTP handlers that allow easy customization and integration with existing middleware, keeping authentication steps separate and orthogonal to session management.
Configurable OAuth2 state parameter handling with secure cookies by default, ensuring CSRF protection out of the box as per RFC 6749.
Includes pre-built handlers for major providers like GitHub and Twitter, simplifying common integrations by fetching user data directly into context.
Offers TokenHandler for token-based logins, specifically useful for native mobile app authentication flows, as demonstrated with Twitter.
Deliberately omits session handling, forcing developers to implement their own session systems in success handlers, which adds complexity and boilerplate.
Only supports a handful of built-in providers; adding others requires composing lower-level OAuth handlers, which can be non-trivial and time-consuming.
Requires manual setup of OAuth configs and handler chains, leading to more initial code compared to integrated frameworks that abstract these details.