# Type alias AuthenticationStrategy

AuthenticationStrategy: {
accountConsumer: ((username: string) => Promise<AccountLinkingConsumer>);
accountProducer: ((username: string) => Promise<AccountLinkingProducer>);
implementation: Auth.Implementation<Components>;
isUsernameAvailable: ((username: string) => Promise<boolean>);
isUsernameValid: ((username: string) => Promise<boolean>);
register: ((options: {
email?: string;
username: string;
}) => Promise<{
success: boolean;
}>);
session: (() => Promise<Maybe<Session>>);
}

#### Type declaration

- ##### accountConsumer: ((username: string) => Promise<AccountLinkingConsumer>)

  - - (username: string): Promise<AccountLinkingConsumer>

    - #### Parameters

      - ##### username: string

      #### Returns Promise<AccountLinkingConsumer>

- ##### accountProducer: ((username: string) => Promise<AccountLinkingProducer>)

  - - (username: string): Promise<AccountLinkingProducer>

    - #### Parameters

      - ##### username: string

      #### Returns Promise<AccountLinkingProducer>

- ##### implementation: Auth.Implementation<Components>

- ##### isUsernameAvailable: ((username: string) => Promise<boolean>)

  - - (username: string): Promise<boolean>

    - #### Parameters

      - ##### username: string

      #### Returns Promise<boolean>

- ##### isUsernameValid: ((username: string) => Promise<boolean>)

  - - (username: string): Promise<boolean>

    - #### Parameters

      - ##### username: string

      #### Returns Promise<boolean>

- ##### register: ((options: {
  email?: string;
  username: string;
  }) => Promise<{
  success: boolean;
  }>)

  - - (options: {
      email?: string;
      username: string;
      }): Promise<{
      success: boolean;
      }>

    - #### Parameters

      - ##### options: {
        email?: string;
        username: string;
        }

        - ##### `Optional` email?: string

        - ##### username: string

      #### Returns Promise<{
      success: boolean;
      }>

- ##### session: (() => Promise<Maybe<Session>>)

  - - (): Promise<Maybe<Session>>

    - #### Returns Promise<Maybe<Session>>

- Defined in index.ts:96

Generated using TypeDoc