← Back to archive

Repo of the Day

adonisjs/ally

Published: Nov 22, 2022

Open repository ↗

Summary

@adonisjs/ally is a social authentication provider for AdonisJS applications. It is a first-party package that integrates OAuth-based login with multiple third-party identity providers, is written in TypeScript, and is released under the MIT license.

What it is useful for

This package is useful when you need to add "Sign in with X" flows to an AdonisJS web app without hand-writing each provider's OAuth dance. The README lists support for GitHub, Google, Twitter, X (Twitter OAuth2), Facebook, Discord, Spotify, and LinkedIn. For a single product that needs to onboard several user groups, such as a developer tool offering GitHub login alongside a consumer-facing Google option, Ally gives you one consistent interface instead of maintaining multiple ad-hoc OAuth clients. Because it is tagged as a first-party AdonisJS package, it fits into the framework's existing auth configuration rather than acting as a generic, framework-agnostic library you would have to wire in by hand.

How engineers can use it

The README does not include installation or configuration commands, so engineers should treat the official AdonisJS social authentication guide at docs.adonisjs.com/guides/auth/social-authentication as the canonical setup reference. A typical workflow, as you would expect from the documentation link, is to install the package, register it as a provider in your AdonisJS app's configuration, supply client credentials for each enabled service, and add routes that initiate the redirect and handle the OAuth callback. From the application side, you would then expose login buttons for the providers you want and read the authenticated user information returned by Ally after the callback completes.

Documented limitations from the supplied source: only the eight providers named above are explicitly listed, so adding an unlisted identity provider would require upstream support or a custom adapter. The README also does not state minimum Node.js version, AdonisJS framework version compatibility, or specific environment variable names, so those details must be confirmed in the official docs before adopting the package in production. The project's contribution rules and Code of Conduct are maintained separately in the AdonisJS organization profile.