Skip to content

users/sign_in.json 405 (Method Not Allowed) #114

@kingbe01

Description

@kingbe01

I am not able to get angular to allow POST for login. I have followed your README and other issues posted but still get the same error. Logging into devise from rails side works fine. I have also added

def set_csrf_cookie_for_ng
cookies['XSRF-TOKEN'] = form_authenticity_token if protect_against_forgery?
end

def verified_request?
super || valid_authenticity_token?(session, request.headers['X-XSRF-TOKEN'])
end

to my application controller and ...

$httpProvider.defaults.headers.common['X-CSRF-Token'] = $('meta[name=csrf-token]').attr('content');

to my main app config. Based off all the documentation I have read this should be working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions