@adonisjs/ally
Version:
Social authentication provider for AdonisJS
16 lines (15 loc) • 701 B
TypeScript
import type { HttpContext } from '@adonisjs/core/http';
import type { AllyManagerDriverFactory } from './types.js';
/**
* AllyManager is used to create instances of a social drivers during an
* HTTP request. The drivers are cached during the lifecycle of a request.
*/
export declare class AllyManager<KnownSocialProviders extends Record<string, AllyManagerDriverFactory>> {
#private;
config: KnownSocialProviders;
constructor(config: KnownSocialProviders, ctx: HttpContext);
/**
* Returns the driver instance of a social provider
*/
use<SocialProvider extends keyof KnownSocialProviders>(provider: SocialProvider): ReturnType<KnownSocialProviders[SocialProvider]>;
}