vue-express-auth's Issues
Errors with latest?
Hi!
Sorry, this question is going to be a bit vague, mostly because I honestly don't know where to go next. I followed this tutorial here (https://auth0.com/blog/how-to-make-secure-http-requests-with-vue-and-express/) and everything worked up to the nearly last entry. Now, I'm getting these errors:
ERROR in /home/aron/code/cx/client/src/views/EventSingle.vue(44,10):
44:10 Property 'getEventData' does not exist on type '{ name: string; data(): { event: {}; }; created(): void; methods: { getEventData(): Promise<void>; }; }'.
42 | },
43 | created() {
> 44 | this.getEventData(); // NEW - call getEventData() when the instance is created
| ^
45 | },
46 | methods: {
47 | async getEventData() {
ERROR in /home/aron/code/cx/client/src/views/EventSingle.vue(49,36):
49:36 Property '$auth' does not exist on type '{ getEventData(): Promise<void>; }'.
47 | async getEventData() {
48 | // Get the access token from the auth wrapper
> 49 | const accessToken = await this.$auth.getTokenSilently()
| ^
50 |
51 | // Use the eventService to call the getEventSingle method
52 | EventService.getEventSingle(this.$route.params.id, accessToken)
ERROR in /home/aron/code/cx/client/src/views/EventSingle.vue(52,38):
52:38 Property '$route' does not exist on type '{ getEventData(): Promise<void>; }'.
50 |
51 | // Use the eventService to call the getEventSingle method
> 52 | EventService.getEventSingle(this.$route.params.id, accessToken)
| ^
53 | .then(
54 | (event => {
55 | this.$set(this, "event", event);
ERROR in /home/aron/code/cx/client/src/views/EventSingle.vue(55,14):
55:14 Property '$set' does not exist on type '{ getEventData(): Promise<void>; }'.
53 | .then(
54 | (event => {
> 55 | this.$set(this, "event", event);
| ^
56 | }).bind(this)
57 | );
58 | }
Here's my tsconfig.json:
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"skipLibCheck": true,
"esModuleInterop": true,
"noImplicitAny": false,
"allowSyntheticDefaultImports": true,
"allowJs": true,
"sourceMap": true,
"baseUrl": ".",
"resolveJsonModule": true,
"types": [
"webpack-env",
"jest"
],
"typeRoots": ["./@types", "./node_modules/@types"],
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost","es2015", "es2016", "es2018.promise"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": [
"node_modules"
]
}
I'm not incredibly familiar with TypeScript, Javascript, etc, and I've been poking around at various ways to solve this - https://blog.risingstack.com/auth0-vue-typescript-quickstart-docs/ and https://auth0.com/docs/quickstart/spa/vuejs/01-login.
My GUESS is that the Vue object prototype is not being extended with the Auth0 plug-in, and it's something about the way the frameworks have changed since this tutorial was written. Any suggestions? Happy to paste in more info if it helps.
Thanks!
(I posted this on stackoverflow as well - https://stackoverflow.com/questions/70147602/methods-not-being-attached-detected-as-part-of-typescript-compilation)
Hamburger Menu Broken
On making the page smaller, the hamburger menu appears, but clicking on it doesn't do anything.
bug
if you refresh after signing up you lose the login session and parts of the page break (login button is gone)
clicking sign up again yields
[Vue warn]: Error in v-on handler: "TypeError: this.auth0Client is null"
found in
---> <Home> at src/views/Home.vue
<App> at src/A
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.