-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
88 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
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"; | ||
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<header>This is a test page</header> | ||
<div> | ||
<button @click="handleLogin">Log in</button> | ||
</div> | ||
</template> | ||
|
||
<!--From Lab --> | ||
<script setup> | ||
import { useAuth0 } from "@auth0/auth0-vue"; | ||
|
||
const { loginWithRedirect } = useAuth0(); | ||
|
||
const handleLogin = () => { | ||
loginWithRedirect({ | ||
appState: { | ||
target: "/profile", | ||
}, | ||
}); | ||
}; | ||
</script> | ||
|
||
<!-- From Auth0 Quickstart Tutorial --> | ||
<!-- <script> | ||
import { useAuth0 } from '@auth0/auth0-vue'; | ||
|
||
export default { | ||
setup() { | ||
const { loginWithRedirect } = useAuth0(); | ||
|
||
return { | ||
login: () => { | ||
loginWithRedirect(); | ||
} | ||
}; | ||
} | ||
}; | ||
</script> --> |