Code Monkey home page Code Monkey logo

auth-service's Introduction

auth-service

OAuth2 Authentication Service for Seamless User Authentication

Getting Started

1. Set Up Environment Variables

Create a .env file with the following configurations:

CLIENT_ID={{YOUR-CLIENT-ID}}
CLIENT_SECRET={{YOUR-CLIENT-SECRET}}
REDIRECT_URI="http://localhost:8081/v1/callback"
AUTH_URL="https://accounts.google.com/o/oauth2/auth"
TOKEN_URL="https://accounts.google.com/o/oauth2/token"
USER_INFO_URL="https://www.googleapis.com/oauth2/v3/userinfo"

DB_HOST=localhost
DB_PORT=3306
DB_USER={{YOUR-DB-USER}}
DB_PASSWORD={{YOUR-DB-PASSWORD}}
DB_NAME=auth_svc

2. Create a new database:

CREATE DATABASE auth_svc;

3. Run Database Migrations

Execute the SQL commands in db/migrations to set up the database schema.

4. Run the Application

Launch the application using the following command:

go run main.go

5. Access the Server

The server will be accessible at http://localhost:8081.

Contributing

We welcome contributions! Feel free to submit issues, feature requests, or pull requests.

License

This project is licensed under the MIT License.

auth-service's People

Contributors

chandra-phang avatar

Watchers

 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.