From 7ce134377fd48da355c32d5bff4df98fcd460db2 Mon Sep 17 00:00:00 2001 From: Michael Fatemi Date: Thu, 8 Jul 2021 12:35:38 -0400 Subject: [PATCH] Fix redirect url --- src/components/Authentication/authorizationEndpoint.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Authentication/authorizationEndpoint.ts b/src/components/Authentication/authorizationEndpoint.ts index 663b0a5..33a9a6f 100644 --- a/src/components/Authentication/authorizationEndpoint.ts +++ b/src/components/Authentication/authorizationEndpoint.ts @@ -9,7 +9,9 @@ function createAuthorizationEndpoint(redirectUrl: string) { return url.toString(); } -const redirectUrl = `${window.location.protocol}://${window.location.host}/auth/ion/callback`; +// window.location.protocol is http: or https: +// window.location.host is localhost:3000 or wheelshare-frontend.vercel.app +const redirectUrl = `${window.location.protocol}//${window.location.host}/auth/ion/callback`; const authorizationEndpoint = createAuthorizationEndpoint(redirectUrl); export default authorizationEndpoint;