Schemes and Strategies

Schemes define authentication logic. Strategy is a configurated instance of Scheme. You can have multiply schemes and strategies in your project.

auth.strategies option is an object. Keys are strategy name and values are configuration.

auth: {
  strategies: {
    local: { /* ... */ },
    github: { /* ... */ },
  }
}

By default, instance name is same as scheme name. If you want more flexibility by providing your own scheme or having multi instances of the same scheme you can use _scheme property:

auth: {
  strategies: {
    local1: { _scheme: 'local', /* ... */ },
    local2: { _scheme: 'local', /* ... */ },
    custom: { _scheme: '~/app/customStrategy.js', /* ... */ },
  }
}

👉 Now that you have idea what are schemes and strategies, you can configure default Local Scheme or use a Provider.

results matching ""

    No results matching ""