File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
openapi_server/controllers Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -5,4 +5,5 @@ COGNITO_REDIRECT_URI=http://localhost:4040/signin
55COGNITO_USER_POOL_ID =
66SECRET_KEY =
77COGNITO_ACCESS_ID =
8- COGNITO_ACCESS_KEY =
8+ COGNITO_ACCESS_KEY =
9+ ROOT_URL = http://localhost:4040
Original file line number Diff line number Diff line change 2929COGNITO_ACCESS_ID = env .get ('COGNITO_ACCESS_ID' )
3030COGNITO_ACCESS_KEY = env .get ('COGNITO_ACCESS_KEY' )
3131SECRET_KEY = env .get ('SECRET_KEY' )
32+ ROOT_URL = env .get ('ROOT_URL' )
3233cognito_client_url = 'https://homeuniteus.auth.us-east-1.amazoncognito.com'
3334
3435
@@ -154,7 +155,7 @@ def signin():
154155 if (response .get ('ChallengeName' ) and response ['ChallengeName' ] == 'NEW_PASSWORD_REQUIRED' ):
155156 userId = response ['ChallengeParameters' ]['USER_ID_FOR_SRP' ]
156157 sessionId = response ['Session' ]
157- return redirect (f"http://localhost:4040 /create-password?userId={ userId } &sessionId={ sessionId } " )
158+ return redirect (f"{ ROOT_URL } /create-password?userId={ userId } &sessionId={ sessionId } " )
158159
159160 access_token = response ['AuthenticationResult' ]['AccessToken' ]
160161 refresh_token = response ['AuthenticationResult' ]['RefreshToken' ]
@@ -423,9 +424,9 @@ def confirm_signup():
423424 ConfirmationCode = code
424425 )
425426
426- return redirect ("http://localhost:4040 /email-verification-success" )
427+ return redirect (f" { ROOT_URL } /email-verification-success" )
427428 except Exception as e :
428- return redirect ("http://localhost:4040 /email-verification-error" )
429+ return redirect (f" { ROOT_URL } /email-verification-error" )
429430
430431# What comes first invite or adding the user
431432#Do I have an oauth token
You can’t perform that action at this time.
0 commit comments