Skip to content

Sending badRequest when unauthorized should have been sent #9

@anasyb

Description

@anasyb

ember-simple-auth expects an unauthorized access (401) to be sent when an issue happens with the auth. At the moment sails is sending a badRequest (400).

Why?

  • In response to receiving 401, simple-auth "invalidates the session and reloads the application" ref.

Fix

  • update AuthController.js to call res.unauthorized instead of res.badRequest
  • include an api/responses/unauthorized.js file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions