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

I checked out my new feathersjs app in another machine, created a new user but I can't log in! #320

Closed
paulophp opened this Issue Oct 21, 2016 · 9 comments

Comments

Projects
None yet
3 participants
@paulophp
Copy link

paulophp commented Oct 21, 2016

I tried many times and no success, in the other machine where I started the app it works fine!
What could cause this behavior?

Thank you guys, I love feathersjs!!!!

@paulophp paulophp changed the title I checked out my new feathersjs app in another machine, created a new user but I can't login! I checked out my new feathersjs app in another machine, created a new user but I can't log in! Oct 21, 2016

@paulophp

This comment has been minimized.

Copy link
Author

paulophp commented Oct 21, 2016

Uncaught (in promise) Error: Could not find stored JWT and no authentication type was given(…)ExtendableBuiltin @ feathers.js:1379FeathersError @ feathers.js:1457NotAuthenticated @ feathers.js:1510(anonymous function) @ feathers.js:737

@daffl

This comment has been minimized.

Copy link
Member

daffl commented Oct 21, 2016

The errors says that no authentication token has been created yet. It means you will have to log in (e.g. with app.authenticate({ type: 'local', email, password }) or the login.html from the chat guide) to create and store a new token.

@paulophp

This comment has been minimized.

Copy link
Author

paulophp commented Oct 22, 2016

Yes this is what intrigues me,
I based my signup and login pages on the chat guide, it works with local storage auth perfectly in the machine OSX I started the project, I create users, login in, do stuff with my logged id "socket events are so cool!", but when I checkedout a copy to work at home in a Ubuntu16 machine it creates the user "mongo works fine" but it always goes: Login Failed
Something went wrong and we weren't able to log you in. Please try again.

*The error I posted above is when I try to run app.authenticate();
because I unlock my main view to try to debugg because I can not get it to log in :(

@paulophp

This comment has been minimized.

Copy link
Author

paulophp commented Oct 22, 2016

I am guessing something about the local token, I don't know how it works, does it need any permissions?
I will try it in a docker, it is my last hope..

@paulophp

This comment has been minimized.

Copy link
Author

paulophp commented Oct 22, 2016

The project is in a privet repository, but I made a zip file of it 1.2mb if anyone want to take a look I can send by e-mail, or past here any part of the code.

thanks!

@ekryski

This comment has been minimized.

Copy link
Member

ekryski commented Oct 22, 2016

@paulophp which database are you using? Are you signing up and logging in again or trying to login using a user that you created on your other machine?

The reason I ask is if you are using NeDB then it stores things on disk so you'll have to "signup" the user again on your Ubuntu machine because they won't exist yet. Feathers really has nothing to do with the OS.

@paulophp

This comment has been minimized.

Copy link
Author

paulophp commented Oct 22, 2016

@ekryski I am using mongodb since I started,
On the Ubuntu machine I signup a new user again, I removed the auth from the service so I can see that the user is being created on mongodb on the ubuntu machine just fine, it shows the users at http://localhost:3030/users

I did it twice even configuring default.json to a different mongodb database, created a new user again, checked it was created, but login always fail.

When I perform signup or login actions nothing about errors show up on the console.
Looks like I just refuse to create a local JWT "session token?" on this ubuntu machine.
On the osx machine the project in the same version works fine, even if I create new users and try to login.

update: I just checked out a copy in a Amazon machine, it has the same behavior, creates new user but can not log in! Everything looks fine, app runs fine, mongodb connects and creates new users, nodejs version is 6.8.0, I can't imagine what I am missing.

Is there a way to debug what happens when I submit the login form? I doesn't tell much about what went wrong.

@paulophp

This comment has been minimized.

Copy link
Author

paulophp commented Oct 22, 2016

I figured it out guys, I am really sorry for the trouble!
I messed with the user/hooks at some point and versioned it, so new users after that wasn't hashing passwords, so login would never work!

I am very thankful for you guys having created FeathersJs and helping Us understanding it!

Thank you all and again I am sorry, this was not a real issue!

@paulophp paulophp closed this Oct 22, 2016

@ekryski

This comment has been minimized.

Copy link
Member

ekryski commented Oct 22, 2016

@paulophp no problem. Glad you got it sorted! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.