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

Log in request 401 error #231

Closed
Clempops opened this issue May 2, 2015 · 1 comment
Closed

Log in request 401 error #231

Clempops opened this issue May 2, 2015 · 1 comment

Comments

@Clempops
Copy link

Clempops commented May 2, 2015

I have a registered user, I try to log him in with this request:

var credentials = {
  email: scope.emailInput,
  password: scope.passwordInput
};
$auth.submitLogin(credentials)
  .then(function(resp) {
    console.log(resp);
  })
  .catch(function(resp) {
    console.log(resp);
  });

returns 401 Unauthorised:

 Started POST "/auth/sign_in" for 127.0.0.1 at 2015-05-02 12:31:32 +0200
12:31:32 web.1  |   ActiveRecord::SchemaMigration Load (0.2ms)  SELECT "schema_migrations".* FROM "schema_migrations"
12:31:32 web.1  | Processing by DeviseTokenAuth::SessionsController#create as JSON
12:31:32 web.1  |   Parameters: {"email"=>"[email protected]", "password"=>"[FILTERED]", "subdomain"=>"api", "session"=>{"email"=>"[email protected]", "password"=>"[FILTERED]"}}
12:31:32 web.1  | Can't verify CSRF token authenticity
12:31:32 web.1  | Unpermitted parameters: subdomain, session
12:31:32 web.1  |   User Load (0.2ms)  SELECT  "users".* FROM "users" WHERE (uid = '[email protected]' AND provider='email')  ORDER BY "users"."id" ASC LIMIT 1
12:31:32 web.1  | Unpermitted parameters: subdomain, session
12:31:32 web.1  | Unpermitted parameters: subdomain, session
12:31:32 web.1  | Unpermitted parameters: subdomain, session
12:31:32 web.1  | Completed 401 Unauthorized in 144ms (Views: 0.6ms | ActiveRecord: 0.9ms)
@Clempops
Copy link
Author

Clempops commented May 4, 2015

I fixed it

@Clempops Clempops closed this as completed May 4, 2015
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