From 5b5de14466ad4932d1a78318ff273e9a0e245366 Mon Sep 17 00:00:00 2001
From: Abhishek Thakur <abhishek4@gmail.com>
Date: Thu, 29 Feb 2024 15:20:37 +0100
Subject: [PATCH] fix oauth

---
 src/autotrain/__init__.py | 2 +-
 src/autotrain/oauth.py    | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/autotrain/__init__.py b/src/autotrain/__init__.py
index 7d97f46d18..ba82b1928a 100644
--- a/src/autotrain/__init__.py
+++ b/src/autotrain/__init__.py
@@ -30,4 +30,4 @@
 warnings.filterwarnings("ignore", category=UserWarning, module="tensorflow")
 
 
-__version__ = "0.7.5.dev0"
+__version__ = "0.7.6.dev0"
diff --git a/src/autotrain/oauth.py b/src/autotrain/oauth.py
index 417913e8e2..3904606797 100644
--- a/src/autotrain/oauth.py
+++ b/src/autotrain/oauth.py
@@ -24,10 +24,7 @@
 
 
 def attach_oauth(app: fastapi.FastAPI):
-    if os.environ.get("SPACE_ID") is not None and int(os.environ.get("USE_OAUTH", 0)) == 1:
-        _add_oauth_routes(app)
-    else:
-        return
+    _add_oauth_routes(app)
     # Session Middleware requires a secret key to sign the cookies. Let's use a hash
     # of the OAuth secret key to make it unique to the Space + updated in case OAuth
     # config gets updated.