Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flutterando/auth-service
https://github.com/flutterando/auth-service
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/flutterando/auth-service
- Owner: Flutterando
- Created: 2019-07-27T18:08:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-23T02:24:28.000Z (almost 2 years ago)
- Last Synced: 2025-01-08T20:02:17.760Z (16 days ago)
- Language: Go
- Size: 200 KB
- Stars: 8
- Watchers: 8
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Auth Flutterando with Golang JWT and hasura
---## Install docker and docker-compose
@todo Consult documentation ...## Configure your database
For perfect operation, use the following user table as a basis
```sql
CREATE TABLE users (
id int pk not null unique,
name text,
mail text not null unique,
password text
)```
If you wanted to change, it would be interesting to read the source code to modify the points you think are best## Run
```bash
$ docker-compose up -d
```## Connect with your application
### Routes
- `/v1/gettoken`
```bash
$ curl -X POST /auth/v1/gettoken -H 'Authorization: Basic BASE64(USER:PASS)'
```- `/v1/check`
```bash
$ curl -X POST /auth/v1/check -H 'Authorization: Bearer TOKEN_JWT'
```- `/v1/checkMail`
```bash
$ curl -X POST /auth/v1/checkMail -H 'Content-Type: application/json' -d '{"name":"João Teste","mail":"[email protected]", ,"code": 12345678}'
```- `/v1/register`
```bash
$ curl -X POST /auth/v1/register -H 'Content-Type: application/json' -d '{"name":"João Teste","mail":"[email protected]", ,"password": "md5-password", "photo": "http://upload-image", "github_user": ""}'
```- `/v1/upload`
```bash
$ curl -X POST /auth/v1/upload -H 'content-type: multipart/form-data;' -F file=FILE_PATH_ON_CLIENT
```- `/v1/uploads/{img}`
```bash
$ curl -X GET /auth/v1/uploads/FILE_UPLOADED
```