Authentication

- Installed magic-sdk
- Created a login button with email
- Store the token and user login state in the vuex store
- Created a logout method that resets the store
This commit is contained in:
2020-11-07 20:56:38 +00:00
parent 01cc192ea8
commit de3d4d03c3
8 changed files with 157 additions and 25 deletions

View File

@@ -14,7 +14,7 @@ export default {
css: [],
// Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
plugins: [],
plugins: [{ src: '~/plugins/magic.js', mode: 'client' }],
// Auto import components (https://go.nuxtjs.dev/config-components)
components: true,
@@ -40,4 +40,7 @@ export default {
// Build Configuration (https://go.nuxtjs.dev/config-build)
build: {},
env: {
magicPublicKey: process.env.NUXT_ENV_PUBLIC_MAGIC_KEY,
},
}