Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DevSpeak/hasura-simple-auth
Simple Auth Server For Signup & Login Mutation
https://github.com/DevSpeak/hasura-simple-auth
auth graphql hasura
Last synced: about 1 month ago
JSON representation
Simple Auth Server For Signup & Login Mutation
- Host: GitHub
- URL: https://github.com/DevSpeak/hasura-simple-auth
- Owner: DevSpeak
- License: mit
- Created: 2019-02-03T12:21:43.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-22T10:41:56.000Z (about 2 years ago)
- Last Synced: 2023-02-24T22:59:19.628Z (almost 2 years ago)
- Topics: auth, graphql, hasura
- Language: JavaScript
- Homepage:
- Size: 150 KB
- Stars: 32
- Watchers: 2
- Forks: 7
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hasura-simple-auth
Simple Auth Server For Signup & Login Mutation**Setup**
1. npm install
1. follow https://docs.hasura.io/1.0/graphql/manual/auth/jwt.html for setting up JWT mode
1. edit config.json
1. npm start
1. add url to remote schemas
1. using docker and localhost? https://docs.hasura.io/1.0/graphql/manual/deployment/docker/index.html#network-config
1. add required schema**Required Schema**
Table Name: `User`
- id (uuid)
- email (string/text)
- password (string/text)```PLpgSQL
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 }
```