Skip to content

kunukn/vue-3-auth0

Repository files navigation

vue-3-auth0

Playground for Vue 3 + Auth0

@auth0/auth0-vue is used.

Getting started

Vue 3 Auth0 demo app.

app demo

Demo

Urlvue-3-auth0/login
Usernamehello@world.com
PasswordH3lloworld!

Auth flow in this demo.

Authorize Code with PKCE.

Prerequisite

  • You need to have an Auth0 app with Universal login experience.
  • The .env must be updated with values from the Auth0 settings.
  • Ensure your backend is running if API fetch is wanted.

Install steps:

# Ensure you have mkcert installed to use https in localhost. https://github.com/FiloSottile/mkcert

npm install

npm run create-env # creates a boilerplate .env file
# Update the .env file with your Auth0 config data.

npm run install-mkcert # Done with your normal OS account. Done once per OS, skip if has been done for your OS.

# Works with Bash shell
npm run create-cert-files-in-folder # Creates the localhost certificates.

# Ensure your backend is running if API fetch is wanted.

npm start # Starts the app using https. Done with your normal OS account.

If you want to play with the API, then the backend-service needs to be started.

Auth setup

https://auth0.com/

Login or create an account.

Create a new SPA application

url-setup-spa

new-api.png

applications-updated

my-app-authorized

login

Thoughts

You can use '@auth0/auth0-spa-js' and create a Vue wrapper if @auth0/auth0-vue is lacking req. features.

About

Playground for Vue 3 + Auth0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published