Auth0 Home Blog Docs

Unexpected token in quickstart code


#1

I get the following error from running the VUE.js quickstart code. Could someone help me with this?

Syntax Error: Unexpected token (16:9)

14 | }
15 |

16 | auth = new auth0.WebAuth({
| ^
17 | domain: ‘productiv-dev.auth0.com’,
18 | clientID: ‘Ytq5XLKiRzog8Mr4SGdzZ-GzbjIIJBH_’,
19 | redirectUri: ‘http://localhost:3000/callback’,

The quickstart code looks like this (private info redacted):
// src/Auth/AuthService.js

import auth0 from ‘auth0-js’
import { AUTH_CONFIG } from ‘./auth0-variables’
import EventEmitter from ‘eventemitter3’
import router from ‘./…/router’

export default class AuthService {

constructor () {
this.login = this.login.bind(this)
this.setSession = this.setSession.bind(this)
this.logout = this.logout.bind(this)
this.isAuthenticated = this.isAuthenticated.bind(this)
}

auth0 = new auth0.WebAuth({
domain: ‘redacted’,
clientID: ‘redacted’,
redirectUri: ‘http://localhost:3000/callback’,
audience: ‘redacted’,
responseType: ‘token id_token’,
scope: ‘openid’
})

login () {
this.auth0.authorize()
}
}


#2

Worked around this. Please feel free to close. Btw, Why can I not edit/delete my posts?