This sample, evolved from an Auth0 Quickstart, demonstrates how to add authentication to a Vue.js application with Auth0. The sample makes use of Auth0's hosted login page which provides centralized authentication.
- Sign up or login to Auth0.
- Set Allowed Callback URLs in settings section to
http://localhost:8080/callback
- Clone or download the repo.
- Install npm packages using
npm
oryarn
.
npm install
- Go to Auth0 and click Sign Up.
- Switch to the Settings section.
- Rename
src/auth/auth0-variables.js-example
tosrc/auth/auth0-variables.js
. - Copy the domain and client ID from the Auth0 portal into place.
export const AUTH_CONFIG = {
clientId: 'CHANGE_ME', // <-- change this
domain: 'CHANGE_ME.auth0.com', // <-- change this
callbackUrl: 'http://localhost:8080/callback',
apiUrl: 'API_IDENTIFIER'
};
npm start
The application will be served at http://localhost:8080
.
This project is a fork of a Quickstart created by Auth0.
This project is licensed under the MIT license. See the LICENSE file for more info.