diff --git a/.env b/.env
index f4f9697..e9e2be3 100644
--- a/.env
+++ b/.env
@@ -1,2 +1,2 @@
-REACT_APP_API_ENDPOINT_0=http://localhost:5000/api
+REACT_APP_API_DOMAIN_=http://localhost:5000/
REACT_APP_API_DOMAIN=https://wheelshare-altbackend-2efyw.ondigitalocean.app/
diff --git a/src/components/Authentication/authorizationEndpoint.ts b/src/components/Authentication/authorizationEndpoint.ts
new file mode 100644
index 0000000..663b0a5
--- /dev/null
+++ b/src/components/Authentication/authorizationEndpoint.ts
@@ -0,0 +1,15 @@
+function createAuthorizationEndpoint(redirectUrl: string) {
+ const url = new URL('https://ion.tjhsst.edu/oauth/authorize');
+
+ url.searchParams.set('response_type', 'code');
+ url.searchParams.set('client_id', 'rNa6n9YSg8ftINdyVPpUsaMuxNbHLo9dh1OsOktR');
+ url.searchParams.set('redirect_uri', redirectUrl);
+ url.searchParams.set('scope', 'read');
+
+ return url.toString();
+}
+
+const redirectUrl = `${window.location.protocol}://${window.location.host}/auth/ion/callback`;
+const authorizationEndpoint = createAuthorizationEndpoint(redirectUrl);
+
+export default authorizationEndpoint;
diff --git a/src/components/WheelShareLoggedOut.tsx b/src/components/WheelShareLoggedOut.tsx
index b1655d4..a5e0213 100644
--- a/src/components/WheelShareLoggedOut.tsx
+++ b/src/components/WheelShareLoggedOut.tsx
@@ -1,30 +1,13 @@
+import authorizationEndpoint from './Authentication/authorizationEndpoint';
import UILink from './UILink';
import UIPrimaryTitle from './UIPrimaryTitle';
-function createAuthorizationEndpoint(redirectUrl: string) {
- const url = new URL('https://ion.tjhsst.edu/oauth/authorize');
-
- url.searchParams.set('response_type', 'code');
- url.searchParams.set('client_id', 'rNa6n9YSg8ftINdyVPpUsaMuxNbHLo9dh1OsOktR');
- url.searchParams.set('redirect_uri', redirectUrl);
- url.searchParams.set('scope', 'read');
-
- return url.toString();
-}
-
-const dev = true;
-const endpoint = createAuthorizationEndpoint(
- dev
- ? 'http://localhost:3000/auth/ion/callback'
- : 'https://wheelshare.space/auth/ion/callback'
-);
-
export default function WheelShareLoggedOut() {
return (
<>
To get started, log in with your Ion account.
-