import { Observable } from 'rxjs'; import { AuthConfig } from './auth-config'; import { LoginOptions } from './auth.service'; import * as i0 from "@angular/core"; /** * Options that are useful to present in any prompt displayed to the user when required to select an identity provider */ export declare type IdentityProviderSelectionOptions = Pick & Pick; /** * Selects the identity provider that should be logged in with. * Register your own instance of this class if you do not want to use default service * (`FirstIdentityProviderSelectorService`) * * @example * ```ts * // identity-provider-prompt.service.ts * @Injectable() * export class IdentityProviderPromptService implements IdentityProviderSelectorService { * * constructor(private config: AuthConfig) { } * * selectIdentityProvider(): Observable { * const idp = this.config.identityProviders[0]; * const ok = idp && confirm(`Sign-in with ${idp.name}`); * return of(ok ? idp.id : undefined); * } * } * * // app.module.ts... * imports: [ * AuthModule.forRoot({ * identityProviderSelectorType: IdentityProviderPromptService * }) * ] * ``` */ export declare abstract class IdentityProviderSelectorService { /** * Return the id of the identity provider that will be used to login or `undefined` to cancel the login flow */ abstract selectIdentityProvider(options: IdentityProviderSelectionOptions): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }