Skip to content

cant use csrf token /csrfToken functionality broken #201

@HERRKIN

Description

@HERRKIN
sane version
0.1.0-beta.2

I was trying to use the socket adapter from @huafu I got stock in a part where it says invalid token < on _getcookie, after talking to @huafu he said I shouldn't deactivate the corsforcookies option which skips csrf token generation because it is insecure. then I tried to request the api for the token myself and I saw that I can't get a token from /csrfToken no mater how I configure config.csrf object. it will always print the template of the home page of the api which says:

Welcome to your backend!


When deploying replace this with your great ember app. In the meantime access your api at 'api/v1/models' and your ember app at localhost:4200.

so I tried running a new sails app and configure the csrf and it does return the json with the token like this:
{'_csrf':'thetokenhash'}

, so there is someting wrong with the handler of /csrfToken in the version of sails on sane. it just doesn't deliver the token.

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