Coder Social home page Coder Social logo

assassinash / authentication Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 526 KB

Its an authentication app whose apis are designed using grpc web with Golang as backend and Angular as frontend.

Go 100.00%
grpc golang kafka mysql protobuf redis angularjs proto grpc-go grpc-typescript grpc-web

authentication's Introduction

EasyAuth

It's an authentication application written in Go.

Golang - Basic Login/Register services implemented using

  • gRPC
  • Database (MySQL)
  • Kafka
  • Redis

Do Insert an application.yaml file with the structure shown in properties dir

Make MySQL DB named authentication and run

CREATE TABLE authentication.user_credentials ( id INT unsigned NOT NULL AUTO_INCREMENT, username VARCHAR(30) NOT NULL, password VARCHAR(100) NOT NULL, phone VARCHAR(13) NOT NULL, created_at timestamp NOT NULL DEFAULT current_timestamp, updated_at timestamp NOT NULL DEFAULT current_timestamp, deleted_at varchar(45) NULL default '0000-00-00 00:00:00', PRIMARY KEY (username, id));

Set the go path by running

export PATH=$PATH:$(dirname $(go list -f '{{.Target}}' .))

After installing all the dependencies

Compile protos by following commands :

protoc -I=proto --go_out=plugins=grpc:proto proto/auth-messages.proto

protoc -I=proto --go_out=plugins=grpc:proto proto/auth-services.proto

Run the Kafka server and Redis servers, and set the required properties in application.yaml file

go run AuthenticationApp.go

It will start the grpc server at the address mentioned in your application.yaml file

To run the Unit tests

go test server/GrpcServer_test.go -v (TestFunction_name)

The otp generated would be visible in the logs, use in while running VerifyOtp test case.

authentication's People

Contributors

assassinash avatar

Stargazers

 avatar

Watchers

 avatar  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.