Omkar008 commited on
Commit
673a6e5
1 Parent(s): e12502a

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -22,7 +22,7 @@ load_dotenv()
22
  GOOGLE_CLIENT_ID = os.getenv('GOOGLE_CLIENT_ID')
23
  GOOGLE_CLIENT_SECRET =os.getenv('GOOGLE_CLIENT_SECRET')
24
  GOOGLE_REDIRECT_URI = os.getenv('GOOGLE_REDIRECT_URI')
25
- GOOGLE_REDIRECT_URI_2= "https://hushh-receipt-radar-redirect-uri-test.hf.space/receipt_radar/callback"
26
  # Configure the logger
27
  logging.basicConfig(level=logging.DEBUG)
28
  logger = logging.getLogger(__name__)
@@ -44,7 +44,7 @@ async def login_google():
44
  # oauth_url = f"https://accounts.google.com/o/oauth2/auth?response_type=code&client_id={GOOGLE_CLIENT_ID}&redirect_uri={GOOGLE_REDIRECT_URI}&scope=openid%20profile%20email&access_type=offline"
45
 
46
  #Below is the URL to prompt the user to login to his specified gmail account and also give a readonly access to his gmail
47
- oauth_url_hr = f"https://accounts.google.com/o/oauth2/auth?response_type=code&client_id={GOOGLE_CLIENT_ID}&redirect_uri={GOOGLE_REDIRECT_URI}&scope=openid%20profile%20email%20https://www.googleapis.com/auth/gmail.readonly&access_type=offline"
48
  return {
49
  "url_hr": oauth_url_hr
50
  }
 
22
  GOOGLE_CLIENT_ID = os.getenv('GOOGLE_CLIENT_ID')
23
  GOOGLE_CLIENT_SECRET =os.getenv('GOOGLE_CLIENT_SECRET')
24
  GOOGLE_REDIRECT_URI = os.getenv('GOOGLE_REDIRECT_URI')
25
+ GOOGLE_REDIRECT_URI_2= "https://omkar008-receipt-radar-test.hf.space/test"
26
  # Configure the logger
27
  logging.basicConfig(level=logging.DEBUG)
28
  logger = logging.getLogger(__name__)
 
44
  # oauth_url = f"https://accounts.google.com/o/oauth2/auth?response_type=code&client_id={GOOGLE_CLIENT_ID}&redirect_uri={GOOGLE_REDIRECT_URI}&scope=openid%20profile%20email&access_type=offline"
45
 
46
  #Below is the URL to prompt the user to login to his specified gmail account and also give a readonly access to his gmail
47
+ oauth_url_hr = f"https://accounts.google.com/o/oauth2/auth?response_type=code&client_id={GOOGLE_CLIENT_ID}&redirect_uri={GOOGLE_REDIRECT_URI_2}&scope=openid%20profile%20email%20https://www.googleapis.com/auth/gmail.readonly&access_type=offline"
48
  return {
49
  "url_hr": oauth_url_hr
50
  }