Coder Social home page Coder Social logo

qgolang / go-auth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from micro-company/go-auth

0.0 0.0 0.0 25.3 MB

Auth micro-service

Home Page: https://micro-company.github.io/go-auth/

License: MIT License

Go 94.85% Makefile 0.34% Dockerfile 1.26% Mustache 3.55%

go-auth's Introduction

go-auth-server

Maintainability Go Report Card

Auth micro-service

Feature

  • JWT auth
  • Support Google recaptcha
  • User manager
  • UI example

Schema auth-service

Getting start

go get -u github.com/golang/protobuf/proto

protoc -I grpc/mail/ grpc/mail/mail.proto --go_out=plugins=grpc:grpc/mail

docker-compose build
docker-compose up

ENV

Name ENV Default value
PORT 4070
MONGO_URL mongodb://localhost/auth
REDIS_URL redis://localhost:6379
RECAPTCHA_PRIVATE_KEY secretKey
ENABLE_CAPTCHA false
OAuth --
OAUTH_GOOGLE_CLIENT_ID --
OAUTH_GOOGLE_CLIENT_SECRET --
OAUTH_REDIRECT_URL http://localhost:3000/auth/callback/:type

Generation cert

openssl genrsa \
    -passout pass:12345678 \
    -out cert/private_key.pem \
    2048
    
openssl rsa \
    -passin pass:12345678 \
    -in cert/private_key.pem \
    -pubout > cert/public_key.pub

technology stack

Back-End

  • Go
  • MongoDB

Kubernetes

# Run minikube
minikube start \
  --network-plugin=cni \
  --kubernetes-version=v1.8.0
  
# Install Helm
# See https://github.com/kubernetes/helm/blob/master/docs/install.md
helm init
helm repo update

# Run application
helm \
  --kube-context minikube \
  install \
  --name go-auth \
  --namespace=demo \
  ops/Helm/go-auth
  
# Delete
helm del --purge go-auth

Initial state for data base

initialState/user.json - contains initial information

OAuth

go-auth's People

Contributors

batazor avatar renovate-bot avatar renovate[bot] avatar imgbotapp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.