Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Flutterando/auth-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

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

$ docker-compose up -d

Connect with your application

Routes

  • /v1/gettoken
    $ curl -X POST /auth/v1/gettoken -H 'Authorization: Basic BASE64(USER:PASS)'
  • /v1/check
    $ curl -X POST /auth/v1/check -H 'Authorization: Bearer TOKEN_JWT'
  • /v1/checkMail
    $ curl -X POST /auth/v1/checkMail -H 'Content-Type: application/json' -d '{"name":"João Teste","mail":"joao@test.com", ,"code": 12345678}'
  • /v1/register
    $ curl -X POST /auth/v1/register -H 'Content-Type: application/json' -d '{"name":"João Teste","mail":"joao@test.com", ,"password": "md5-password", "photo": "http://upload-image", "github_user": ""}'
  • /v1/upload
    $ curl -X POST /auth/v1/upload -H 'content-type: multipart/form-data;' -F file=FILE_PATH_ON_CLIENT
  • /v1/uploads/{img}
    $ curl -X GET /auth/v1/uploads/FILE_UPLOADED

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors