Skip to content
July 07, 2019

Feathers authentication configuration

config/default.yml

authentication:
  # secret for signing jwt tokens
  secret: some-secret

  # strategies that are used in authentication
  # create endpoint when doing initial websocket
  # authentication or exchanging credentials to
  # a jwt token
  authStrategies:
    - jwt
    - local

  # entity is how to name the "user"
  # in your context.params, e.g. context.params.user
  entity: user
  # service is the name of your users service
  service: users

  # jwt options
  jwtOptions:
    audience: https://yourapp.com
    issuer: yourapp
    algorithm: HS256
    expiresIn: 5d

  # local strategy options
  local:
    usernameField: email
    passwordField: password

  # oauth strategy options,
  # google in this case
  oauth:
    redirect: /auth/store
    google:
      key: google-key
      secret: google-secret
      scope: email openid profile
      custom_params:
        prompt: select_account