BUGFIX: Profile folder is now created within docker volumes for accounts registered using Google OAuth

This commit is contained in:
JustIceO7
2025-03-07 01:45:18 +00:00
parent 4b9c1196d4
commit b26becb9e8

View File

@@ -6,6 +6,7 @@ from database.database import Database
from dotenv import load_dotenv
from secrets import token_hex, token_urlsafe
from random import randint
from utils.path_manager import PathManager
oauth_bp = Blueprint("oauth", __name__)
google = None
@@ -14,6 +15,8 @@ load_dotenv()
url_api = getenv("VITE_API_URL")
url = getenv("HOMEPAGE_URL")
path_manager = PathManager()
def init_oauth(app):
"""
@@ -115,6 +118,7 @@ def google_auth():
)
)
user_data = get_session_info_email(user_email)
path_manager.create_user(username)
# Store origin, username and user_id before clearing session
origin = session.get("origin", f"{url.replace('/api', '')}")