We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Ben • 5 years ago

Thanks for this, really helpful! I apologise if I have missed this point, but where and how do we specify what a username and password should be in order to successfully log in? If not covered here, are there any tutorials/simple steps to follow to just add say a static single password?

Chris • 5 years ago

Thanks Ben! Glad it was useful. This post covers the client only, so assumes there is also an API running that will return a signed access token.

Some useful resources here:
https://www.digitalocean.co...

Not sure what back end stack you're working with but in Node you could quite quickly mock an API endpoint that returned an access token using Express and the jsonwebtoken package

https://www.npmjs.com/packa...

Ben • 5 years ago

Great thanks for your help. I have been looking at this: https://www.techiediaries.c... but would this continue to work ok in a live environment?

Chris • 5 years ago

Hi Ben, json-server looks like its designed more for testing/mocking data so not sure how much use it would be in a live environment? If you just want to display sample data probably OK. But yes it is based on Express so would run in a Node environment (you'd need to deploy on your server)

Josh Dale • 7 years ago

Nice post! Can you post a link to your GitHub?

Chris • 7 years ago

Thanks mate, glad you liked it. Updated post + GH link here: https://github.com/chrismroberts/vue-auth-example