Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kingbe01 opened this issue Sep 1, 2016 · 0 comments
Open

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

kingbe01 opened this issue Sep 1, 2016 · 0 comments

Comments

@kingbe01
Copy link

kingbe01 commented Sep 1, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant