Spaces:
Sleeping
Sleeping
redirect
Browse files
agentic_implementation/oauth_manager.py
CHANGED
|
@@ -16,6 +16,11 @@ import time
|
|
| 16 |
from http.server import HTTPServer, BaseHTTPRequestHandler
|
| 17 |
import urllib.parse as urlparse
|
| 18 |
from logger import logger
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
class OAuthCallbackHandler(BaseHTTPRequestHandler):
|
| 21 |
"""HTTP request handler for OAuth callback"""
|
|
@@ -104,7 +109,7 @@ class GmailOAuthManager:
|
|
| 104 |
self._init_encryption()
|
| 105 |
|
| 106 |
# OAuth flow settings
|
| 107 |
-
self.redirect_uri =
|
| 108 |
|
| 109 |
# Current account
|
| 110 |
self.current_account_email = self._load_current_account()
|
|
|
|
| 16 |
from http.server import HTTPServer, BaseHTTPRequestHandler
|
| 17 |
import urllib.parse as urlparse
|
| 18 |
from logger import logger
|
| 19 |
+
from dotenv import load_dotenv
|
| 20 |
+
load_dotenv()
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
redirect_uri=os.getenv("GOOGLE_REDIRECT_URI")
|
| 24 |
|
| 25 |
class OAuthCallbackHandler(BaseHTTPRequestHandler):
|
| 26 |
"""HTTP request handler for OAuth callback"""
|
|
|
|
| 109 |
self._init_encryption()
|
| 110 |
|
| 111 |
# OAuth flow settings
|
| 112 |
+
self.redirect_uri = redirect_uri
|
| 113 |
|
| 114 |
# Current account
|
| 115 |
self.current_account_email = self._load_current_account()
|