app/controllers/backoffice/users_controller.rb
# This endpoint is used by an Auth0 rule to ensure the user signin-in to the
# backoffice have been granted access.
# To minimise bad actors hitting this endpoint, we use a bearer token.
# Refer to the rule for details: `config/auth0/rules/check_user_exists.js`
#
This endpoint is used by an Auth0 rule to ensure the user signin-in to the
backoffice have been granted access.
To minimise bad actors hitting this endpoint, we use a bearer token.
Refer to the rule for details: `config/auth0/rules/check_user_exists.js`
This endpoint is used by an Auth0 rule to ensure the user signin - in to the backoffice have been granted access . To minimise bad actors hitting this endpoint we use a bearer token . Refer to the rule for details : ` config / auth0 / rules / check_user_exists . js `
def exists
      email = params[:id]
      user  = BackofficeUser.active.find_by(email: email)
      if user.nil?
        process_forbidden(email)
        head(404)
      else
        process_login(user)
        head(200)
      end
    end
def exists email = params [ :id ] user = BackofficeUser . active . find_by ( email : email ) if user . nil? process_forbidden ( email ) head ( 404 ) else process_login ( user ) head ( 200 ) end end
This endpoint is used by an Auth0 rule to ensure the user signin-in to the
backoffice have been granted access.
This endpoint is used by an Auth0 rule to ensure the user signin - in to the backoffice have been granted access .