Skip to content

Commit

Permalink
fix oauth
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekkrthakur committed Feb 29, 2024
1 parent e8f7c78 commit 5b5de14
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/autotrain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
warnings.filterwarnings("ignore", category=UserWarning, module="tensorflow")


__version__ = "0.7.5.dev0"
__version__ = "0.7.6.dev0"
5 changes: 1 addition & 4 deletions src/autotrain/oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5b5de14

Please sign in to comment.