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

Login fails after previously working fine - still works from postman #178

Open
wilburluce opened this issue Jul 9, 2020 · 2 comments
Open

Comments

@wilburluce
Copy link

Running 0.4.0
I verified the admin user is still in the db
Logging in from browser just comes back with 302 back to login
I CAN post to the login URL with creds from postman and get back the home page with the list of entities
I tried in 3 browsers Chrome, Safari, Brave
I also wrote a test webapp that tried to login via axios and it also does not succeed (gets 302)

Note: what has recently changed in the App as I added Passport JWT to most of the endpoints, but i am not protecting the admin route with any guards.. but that could be a clue as to what is wrong. Im puzzled that postman works.
Any insights are much appreciated.

@wilburluce
Copy link
Author

Update: after stepping with debugger, the admin app is actually using my apps user table for authentication not adminUser.. seems like a feature - but in my case, not what i want. will look at the docs

@wilburluce
Copy link
Author

The plot thickens: im using a passport strategy 'local' which is apparently overwriting the same strategy used by the admin.. so that is why im able to login with my users, but not with the admin user i created. I think this is could be considered an accidental feature in that its really easy to implement your own authentication. One twist, i renamed my local strategy to 'local-md' and now i can login with both the admin user and my list of users.. that puzzles me.. i was expecting to just be able to login with the admin user.

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