user creation on signup
muhammad-ammar opened this issue · comments
That is correct. There has to be an existing user for the authentication to work. You would need to create a signup view. You can use the code generation in the signup view and ask for the users email and then create a user and call authenticate. nopassword will then send a login code if there is no keyword argument code
.
Example
from django.contrib.auth import authenticate
def signup(request):
# create user as new_user
authenticate(username=new_user.username)
return redirect('login')
I'm going to close this issue, but please don't hesitate to ask more questions.
@relekang Bundle of thanks for your reply and code example.