Skip to content

Commit 2e1d1a8

Browse files
authored
Merge pull request #1 from liquify-validation/google-auth
fixed google auth org name error
2 parents de97303 + 37fd960 commit 2e1d1a8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

API/Auth/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ def post(self, token):
428428
return jsonify({"message": "Your password has been updated successfully."}), 200
429429

430430

431-
@blp.route("/refresh") # Working
431+
@blp.route("/refresh")
432432
class TokenRefresh(MethodView):
433433
@jwt_required(refresh=True)
434434
def post(self):
@@ -437,7 +437,7 @@ def post(self):
437437
return {"access_token": new_token}
438438

439439

440-
@blp.route("/logout") # Working
440+
@blp.route("/logout")
441441
class UserLogout(MethodView):
442442
@jwt_required()
443443
def post(self):

resources/googleAuth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ def google_callback():
5858
is_email_verified=data['verified_email'] if 'verified_email' in data else False,
5959
mfa_enabled=False,
6060
password=bcrypt.hashpw(random_string.encode('utf-8'), bcrypt.gensalt()),
61+
org_name=data['email']
6162
)
6263
db.session.add(user)
6364
db.session.commit()
6465

65-
# make them an org - name it with email (they can change it later)
6666
admins = [user.id]
6767
org = OrgModel(
6868
org_owner=user.id,

0 commit comments

Comments
 (0)