Skip to content

React with Golang JWT Authentication - (FREE CODE CAMP Tutorial)

Notifications You must be signed in to change notification settings

zennon-sml/go-jwt-react-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

RGB2

GOLANG JWT AUTH API WITH REACT

  • Using GIN has server and main tool
  • Making a basic auth process from the JSON requests
  • Creating cookies http/only for security
  • Keeping the data on a postgres online database
  • Learning and listening to some music while at it
  • And at last but not least having some fun :}

SERVER

  • GIN: deal with requests and responses, set cookies and the JWT token

ROUTES

  • POST /v1/register --> github.com/zennon-sml/GJR2/controllers.Register (3 handlers)
  • POST /v1/login --> github.com/zennon-sml/GJR2/controllers.Login (3 handlers)
  • POST /v1/logout --> github.com/zennon-sml/GJR2/controllers.Logout (3 handlers)
  • GET /v1/userauth --> github.com/zennon-sml/GJR2/controllers.UserAuth (3 handlers)

DATABASE

  • POSTGRES: database hosted on ElephantSQL and also seted up a local postgres container

ORM

  • GORM: object relational maping for the database

ENVIROMENT

  • godotenv: way to get enviroment variables from .env

JWT

  • JWT: go package to make a json web token

PASSWORD SAFETY

  • BCRYPT: password encrypiting and decripter

POSTMAN

  • POSTMAN: use for testing the back end with requests

About

React with Golang JWT Authentication - (FREE CODE CAMP Tutorial)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published