You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using j-toker to update a user’s account details, and to handle auth throughout my JS app generally. It works fine for signing in and out, and updating other resources on the API, but when I try to update the user's account with j-toker's built in method for doing so the request fails.
Serverside, I get: Started OPTIONS "/api/v1/auth" for 127.0.0.1 at 2015-07-27 17:46:37 +0200 ActionController::RoutingError (No route matches [OPTIONS] "/api/v1/auth"):
On the browser: XMLHttpRequest cannot load http://0.0.0.0:3000/api/v1/auth. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 404.
rack-cors is handling the OPTIONS request everywhere else , and doesn't complain about there being no matching routes. As j-toker seems to be doing it's job right for everything else, I feel like this may be something to do with devise_token_auth. Any ideas on how to handle this?
Looking at the rails server console it doesn't look like the OPTIONS requests for other resources never even hit the router. I'm really stumped.
The text was updated successfully, but these errors were encountered:
I'm using j-toker to update a user’s account details, and to handle auth throughout my JS app generally. It works fine for signing in and out, and updating other resources on the API, but when I try to update the user's account with j-toker's built in method for doing so the request fails.
Serverside, I get:
Started OPTIONS "/api/v1/auth" for 127.0.0.1 at 2015-07-27 17:46:37 +0200 ActionController::RoutingError (No route matches [OPTIONS] "/api/v1/auth"):
On the browser:
XMLHttpRequest cannot load http://0.0.0.0:3000/api/v1/auth. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 404.
rack-cors is handling the OPTIONS request everywhere else , and doesn't complain about there being no matching routes. As j-toker seems to be doing it's job right for everything else, I feel like this may be something to do with devise_token_auth. Any ideas on how to handle this?
Looking at the rails server console it doesn't look like the OPTIONS requests for other resources never even hit the router. I'm really stumped.
The text was updated successfully, but these errors were encountered: