8000 GitHub - ceracera/hasura-simple-auth: Simple Auth Server For Signup & Login Mutation
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ceracera/hasura-simple-auth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hasura-simple-auth

Simple Auth Server For Signup & Login Mutation

Setup

  1. npm install
  2. follow https://docs.hasura.io/1.0/graphql/manual/auth/jwt.html for setting up JWT mode
  3. edit config.json
  4. npm start
  5. add url to remote schemas
    1. using docker and localhost? https://docs.hasura.io/1.0/graphql/manual/deployment/docker/index.html#network-config
  6. add required schema

Required Schema Table Name: User

  • id (uuid)
  • email (string/text)
  • password (string/text)
CREATE TABLE public."user" (
    id uuid DEFAULT public.gen_random_uuid() NOT NULL,
    email text NOT NULL,
    password text NOT NULL
);

ALTER TABLE ONLY public."user"
    ADD CONSTRAINT user_email_key UNIQUE (email);
    
ALTER TABLE ONLY public."user"
    ADD CONSTRAINT user_pkey PRIMARY KEY (id);

Queries

me { email } // Used for login check

Mutations

login(email: String, password: String) { token }
signup(email: String, password: String) { token }

About

Simple Auth Server For Signup & Login Mutation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%
0