6

I'm completely new to web development and have never implemented anything that needs some kind of authentication before - basically, where the user can sign up, log in and log out.

I've stumbled across Hasura, a GraphQL server over Postgres and deployed it to Heroku. After creating some tables and populating them with data, I created a small Vue application that can query and mutate this data using vue-apollo, and this seems to work fine.

Now I want to restrict the use of the application, unless a user is logged in. I've read through the authentication / access control section of their documentation, but I don't really get how I can accomplish this... All the examples are seemingly created with React. They talk about having (not) logged in users, but I don't even get how to create one, or what a "logged in" user means in context. Furthermore it mostly mentions JWT and webhooks and I've never used them either... In my mind it should be pretty simple, but it seems overly complicated (it's probably just me being dumb).

All I want is a simple sign up form where a user can enter a username and password, and then use this username and password to log in in the future. How can I do this, and are there any examples of this with Vue and vue-apollo?

Daniel Richter
  • 210
  • 1
  • 2
  • 22
Mosbas
  • 119
  • 8
  • Did you take a look at https://github.com/websanova/vue-auth ? It's a complete example of auth with vue.js. But If you are new to webdev and if your app has few users, you should use auth0 like this: https://github.com/hasura/graphql-engine/tree/master/community/sample-apps/todo-auth0-jwt – ManUtopiK Aug 24 '19 at 15:31

0 Answers0