create confirmed account with social login
This commit is contained in:
parent
6ff2a7957f
commit
683fc644c8
1 changed files with 1 additions and 2 deletions
|
@ -34,7 +34,6 @@ def unconfirmed():
|
|||
|
||||
@auth.route('/register', methods=['GET', 'POST'])
|
||||
def register():
|
||||
#print(current_app.secret_key)
|
||||
page = { 'title': 'Register' }
|
||||
form = RegistrationForm()
|
||||
if form.validate_on_submit():
|
||||
|
@ -157,7 +156,7 @@ def oauth2_callback(provider):
|
|||
user = db.session.scalar(db.select(User).where(User.email == email))
|
||||
if user is None:
|
||||
#user = User(email=email, username=email.split('@')[0])
|
||||
user = User(email=email)
|
||||
user = User(email=email, confirmed=True)
|
||||
db.session.add(user)
|
||||
db.session.commit()
|
||||
|
||||
|
|
Loading…
Reference in a new issue