¶ ↑
READMEA simple example of configuring CORS and overriding Devise to pass a JWT when authenticating remotely via JSON.
You can view a screencast explaining this in detail here: www.youtube.com/watch?v=_CAq-F2icp4
Here is an example of a post request to create an account:
curl -H "Content-Type: application/json" \ -X POST \ -d '{"user":{"email":"[email protected]","password":"12345678","password_confirm":"12345678"}}' \ http://localhost:3000/users.json
And to authenticate:
curl -H "Content-Type: application/json" \ -X POST \ -d '{"user": {"email":"[email protected]","password":"12345678"}}' \ http://localhost:3000/users/sign_in.json