├── .babelrc ├── .gitignore ├── .postcssrc ├── README.md ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html └── src ├── App.vue ├── assets └── logo.png ├── auth.js ├── components └── HelloWorld.vue ├── main.js ├── router.js └── views ├── Callback.vue └── Home.vue /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@vue/app" 4 | ] 5 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | -------------------------------------------------------------------------------- /.postcssrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": { 3 | "autoprefixer": {} 4 | } 5 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Auth0 Vue 2 | 3 | Make sure to exchnage the auth0 information with your own in the `auth.js`. 4 | 5 | ## A Vue.js Demo Application which uses Auth0 for Authentication 6 | 7 |  8 | 9 | You can follow the full tutorial on [Storyblok](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication) or simply use this as a boilerplate for your applications. 10 | 11 | ## The tutorial for this repository... 12 | 13 | can be found on [Storyblok](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication). It guides you through the following steps: 14 | 15 | - [Introduction](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication) 16 | - [Environment Setup](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication#environment-setup) 17 | - [Prepare Auth0](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication#prepare-auth0) 18 | - [Auth0 Callback Route](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication#auth0-callback-route) 19 | - [Auth0 + Vue.js Authentication](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication#setup-auth0--vuejs-auth-plugin) 20 | - [Adding a Navigation Guard](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication#adding-a-navigation-guard) 21 | - [Accessing User Information](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication#accessing-user-information) 22 | 23 | ## How to use 24 | 25 | 1. Checkout this repository 26 | 2. Exchange your Auth0 client settings in `src/auth.js` 27 | 3. Navigate into the project folder 28 | 4. Execute `npm install` or `yarn` to install dependencies 29 | 5. Start application: `npm run serve` 30 | 31 | ## Feedback 32 | 33 | I'm looking forward to receive your feedback, best place would definitly be in the comment section at the bottom of the [tutorial on Storyblok](https://www.storyblok.com/tp/how-to-auth0-vuejs-authentication). 34 | 35 | ## What to expect 36 | 37 | This application/tutorial gives you a quick feeling of how to use Auth0 with your Vue.js application, you can also use it as a starting point for your projects. 38 | 39 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "auth0-vue", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve --open", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "auth0-js": "^9.3.0", 11 | "axios": "^0.17.1", 12 | "vue": "^2.5.16", 13 | "vue-router": "^3.0.1" 14 | }, 15 | "devDependencies": { 16 | "@vue/cli-plugin-babel": "^3.0.0-beta.11", 17 | "@vue/cli-service": "^3.0.0-beta.11", 18 | "vue-template-compiler": "^2.5.16" 19 | }, 20 | "browserslist": [ 21 | "> 1%", 22 | "last 2 versions", 23 | "not ie <= 8" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DominikAngerer/auth0-vue/2081aa631a36e36c947c5b653ae8ad2ee1f098c7/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 |We hope you liked this tutorial and can now start building new astounding projects from this start point. If you're interested in what we're doing besides tech tutorials check out @storyblok.
18 |TBH, I'm sure this project of yours would look great with a landing page filled with content composed in Storyblok 🎉
20 | 21 |22 | Getting Started 23 | Tweet it 24 |
25 | 26 |