diff --git a/.env b/.env
new file mode 100644
index 0000000..4a87c9a
--- /dev/null
+++ b/.env
@@ -0,0 +1,6 @@
+VITE_API_SERVER_URL=http://localhost:6060
+VITE_AUTH0_DOMAIN=dev-gi0zusfv0z1zvt1x.us.auth0.com
+VITE_AUTH0_CLIENT_ID=clCyl1SjISWMmL2iMStXnQzHTBy44wwq
+VITE_AUTH0_CALLBACK_URL=http://localhost:5173/callback
+VITE_AUTH0_AUDIENCE=https://dev-gi0zusfv0z1zvt1x.us.auth0.com/api/v2/
+# VITE_API_SERVER_URL=https://fuprqaj0n4.execute-api.us-east-1.amazonaws.com/Prod
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 24923c0..ce32514 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"name": "testing-vue-create",
"version": "0.0.0",
"dependencies": {
+ "@auth0/auth0-vue": "^2.3.2",
"@unocss/reset": "^0.56.5",
"axios": "^1.5.1",
"vue": "^3.3.4",
@@ -18,6 +19,28 @@
"vite": "^4.4.9"
}
},
+ "node_modules/@auth0/auth0-spa-js": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/@auth0/auth0-spa-js/-/auth0-spa-js-2.1.2.tgz",
+ "integrity": "sha512-xdA65Z/U7++Y7L9Uwh8Q8OVOs6qgFz+fb7GAzHFjpr1icO37B//xdzLXm7ZRgA19RWrsNe1nme3h896igJSvvw=="
+ },
+ "node_modules/@auth0/auth0-vue": {
+ "version": "2.3.2",
+ "resolved": "https://registry.npmjs.org/@auth0/auth0-vue/-/auth0-vue-2.3.2.tgz",
+ "integrity": "sha512-HV53tLzT6yfRmbfp0pm7BG54i7fm1nIfj8mTd0HrhZP028fuxtyTPN9p+CY7uRvOm12aAxPZXdJlZ8/TVpxmPA==",
+ "dependencies": {
+ "@auth0/auth0-spa-js": "^2.1.2",
+ "vue": "^3.2.41"
+ },
+ "peerDependencies": {
+ "vue-router": "^4.0.12"
+ },
+ "peerDependenciesMeta": {
+ "vue-router": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@babel/parser": {
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
diff --git a/package.json b/package.json
index a1953b4..addc749 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,7 @@
"preview": "vite preview"
},
"dependencies": {
+ "@auth0/auth0-vue": "^2.3.2",
"@unocss/reset": "^0.56.5",
"axios": "^1.5.1",
"vue": "^3.3.4",
diff --git a/src/main.js b/src/main.js
index 758f943..296d602 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,7 +1,7 @@
import "./assets/main.css";
//Added for Auth) login
-// import { createAuth0 } from '@auth0/auth0-vue'
+import { createAuth0 } from '@auth0/auth0-vue'
import { createApp } from "vue";
import App from "./App.vue";
@@ -9,19 +9,18 @@ import router from "./router";
const app = createApp(App);
-//Original app.use()
-app.use(router);
-
-//Auth0 app.use()
-// app.use(
-// createAuth0({
-// domain:"dev-gi0zusfv0z1zvt1x.us.auth0.com",
-// clientId: "clCyl1SjISWMmL2iMStXnQzHTBy44wwq",
-// authorizationParams: {
-// redirect_uri: window.location.origin
-// }
-// })
-// );
-
+//From Lab
+app
+ .use(router)
+ .use(
+ createAuth0({
+ domain: import.meta.env.VITE_AUTH0_DOMAIN,
+ clientId: import.meta.env.VITE_AUTH0_CLIENT_ID,
+ authorizationParams: {
+ audience: import.meta.env.VITE_AUTH0_AUDIENCE,
+ redirect_uri: import.meta.env.VITE_AUTH0_CALLBACK_URL,
+ },
+ })
+ )
app.mount("#app");
diff --git a/src/router/index.js b/src/router/index.js
index 2eeb1d0..7131e40 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -9,6 +9,7 @@ import LoginPage from "../views/LoginPage.vue";
import SignUp from "../views/SignUp.vue";
import ScheduleView from "../views/ScheduleView.vue";
import StudentCourseView from "../views/StudentCourseView.vue";
+import Test from "../views/Test.vue";
const router = createRouter({
// the history mode determines how vue router interacts with the url.
@@ -59,6 +60,11 @@ const router = createRouter({
name: "mycourses",
component: StudentCourseView,
},
+ {
+ path: "/test",
+ name: "test",
+ component: Test,
+ },
],
});
diff --git a/src/views/Test.vue b/src/views/Test.vue
new file mode 100644
index 0000000..178e5c8
--- /dev/null
+++ b/src/views/Test.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file