Selecting Auth Backend
00:05 There’s one problem with the example you’ve just seen. By enabling GitHub login, you accidentally broke the normal user creation process. This happened because Django previously had only one authentication backend to choose from, and now it has two. Django doesn’t know which one to use when creating new users. So you need to help it decide.
To do that, make the changes seen-on screen in the registration view. As before, a user is created from the form data, but this time it’s not immediately saved thanks to
commit=False. In the next line, a backend is associated with the user, and only then is the user saved to the database.
Become a Member to join the conversation.