Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Authenticating and creating #100
I propose adding a config option that allows the user to specify if the auth service should automatically create a user if passport authentication fails due to the account not existing.
The authentication call would look something like:
My example isn't 100% correct but you get the gist of the idea. Right now the way things work you'd first have to make a
What I want to be able to do is:
Another idea could be to have a configuration option for a signup route, which would hash the password (if a password is supplied), create a user, then generate a token.
@daffl do you have any thoughts on something like this?
I had thought about this and intentionally left it off because creation is just a POST to
@daffl and I talked about this today in fact. I'm not 100% sold on the idea, not because it isn't good, but because I don't want to bloat feathers-auth when feature is going to be dependent on your business logic a bit.
@startupthekid let me stew on it for a day or so. I'm going to be doing some auth work this weekend most likely so I'll hopefully have some time to spike it out along with the work I've been doing on the password service.
That does make sense, avoiding bloat is generally a good thing. And to play devil's advocate to my own idea, the less unintended side effects there are the easier it is to understand for the end user. And it's not like you can't lock down the api further using a custom hook and an api key or something similar.
Now that I think about it, while it might be useful feature, it might not be needed. I like the idea of pure functions i.e. it only does one thing and there are no side effects involved.