Skip to content

Commit

Permalink
update url to root_url
Browse files Browse the repository at this point in the history
  • Loading branch information
stevbark committed Jun 21, 2023
1 parent fc208e6 commit 49b1594
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ COGNITO_USER_POOL_ID=
SECRET_KEY=
COGNITO_ACCESS_ID=
COGNITO_ACCESS_KEY=
URL=http://localhost:4040
ROOT_URL=http://localhost:4040
8 changes: 4 additions & 4 deletions api/openapi_server/controllers/auth_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
COGNITO_ACCESS_ID = env.get('COGNITO_ACCESS_ID')
COGNITO_ACCESS_KEY = env.get('COGNITO_ACCESS_KEY')
SECRET_KEY=env.get('SECRET_KEY')
URL=env.get('URL')
ROOT_URL=env.get('ROOT_URL')
cognito_client_url = 'https://homeuniteus.auth.us-east-1.amazoncognito.com'


Expand Down Expand Up @@ -155,7 +155,7 @@ def signin():
if(response.get('ChallengeName') and response['ChallengeName'] == 'NEW_PASSWORD_REQUIRED'):
userId = response['ChallengeParameters']['USER_ID_FOR_SRP']
sessionId = response['Session']
return redirect(f"{URL}/create-password?userId={userId}&sessionId={sessionId}")
return redirect(f"{ROOT_URL}/create-password?userId={userId}&sessionId={sessionId}")

access_token = response['AuthenticationResult']['AccessToken']
refresh_token = response['AuthenticationResult']['RefreshToken']
Expand Down Expand Up @@ -424,9 +424,9 @@ def confirm_signup():
ConfirmationCode=code
)

return redirect(f"{URL}/email-verification-success")
return redirect(f"{ROOT_URL}/email-verification-success")
except Exception as e:
return redirect(f"{URL}/email-verification-error")
return redirect(f"{ROOT_URL}/email-verification-error")

# What comes first invite or adding the user
#Do I have an oauth token
Expand Down

0 comments on commit 49b1594

Please sign in to comment.