All Projects → hypebeast → Micro Auth

hypebeast / Micro Auth

Licence: mit
A microservice that makes adding authentication with Google and Github to your application easy.

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to Micro Auth

Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (-38.2%)
Mutual labels:  authentication, docker-compose
Proxygateway
Proxy Gateway基于openresty(nginx lua module)开发,可以作为接口网关(api gateway)使用,整合业务模块接口,微服务治理聚合,通过web配置界面,能够轻松进行代理配置管理,支持负载均衡,服务器状态检测等
Stars: ✭ 335 (-28.11%)
Mutual labels:  openresty, nginx
Devilbox
A modern Docker LAMP stack and MEAN stack for local development
Stars: ✭ 3,598 (+672.1%)
Mutual labels:  docker-compose, nginx
Dice
前后端分离Blog系统,采用Nuxt、Vue 2.x 和 SpringBoot 全家桶。
Stars: ✭ 222 (-52.36%)
Mutual labels:  openresty, docker-compose
Django React Boilerplate
DIY Django + React Boilerplate for starting your SaaS
Stars: ✭ 385 (-17.38%)
Mutual labels:  docker-compose, nginx
Luajit.io
luajit io framework
Stars: ✭ 277 (-40.56%)
Mutual labels:  openresty, nginx
Apioak
Full Lifecycle Management API Gateway.
Stars: ✭ 335 (-28.11%)
Mutual labels:  openresty, nginx
Nginx Admins Handbook
How to improve NGINX performance, security, and other important things.
Stars: ✭ 12,463 (+2574.46%)
Mutual labels:  openresty, nginx
Nginx Ui
Nginx UI allows you to access and modify the nginx configurations files without cli.
Stars: ✭ 4,067 (+772.75%)
Mutual labels:  docker-compose, nginx
Kong Docs Cn
微服务 Api 网关 Kong 最新文档中文版
Stars: ✭ 371 (-20.39%)
Mutual labels:  openresty, nginx
Lnmp
LEMP stack/LAMP stack/LNMP stack installation scripts for CentOS/Redhat Debian and Ubuntu
Stars: ✭ 2,488 (+433.91%)
Mutual labels:  openresty, nginx
Docker Laravel
🐳 Build a simple laravel development environment with docker-compose.
Stars: ✭ 415 (-10.94%)
Mutual labels:  docker-compose, nginx
Lua Resty Redis Connector
Connection utilities for lua-resty-redis
Stars: ✭ 186 (-60.09%)
Mutual labels:  openresty, nginx
Docker Nginx Auto Ssl
Docker image for automatic generation of SSL certs using Let's encrypt and Open Resty
Stars: ✭ 282 (-39.48%)
Mutual labels:  openresty, nginx
Orange
OpenResty/Nginx Gateway for API Monitoring and Management.
Stars: ✭ 2,208 (+373.82%)
Mutual labels:  openresty, nginx
Oauth
🔗 OAuth 2.0 implementation for various providers in one place.
Stars: ✭ 336 (-27.9%)
Mutual labels:  google, authentication
Oneinstack
OneinStack - A PHP/JAVA Deployment Tool
Stars: ✭ 1,983 (+325.54%)
Mutual labels:  openresty, nginx
Lua Resty Repl
Interactive console (REPL) for Openresty and luajit code
Stars: ✭ 165 (-64.59%)
Mutual labels:  openresty, nginx
Stacker
Stacker - The environment for local web development, ready for use.
Stars: ✭ 356 (-23.61%)
Mutual labels:  docker-compose, nginx
Nginx Openresty Windows
nginx for windows with openresty
Stars: ✭ 404 (-13.3%)
Mutual labels:  openresty, nginx

micro-auth

A microservice that makes adding authentication with Google or GitHub to your application easy.

This service allows you to use Google and GitHub OAuth2 service to add authentication to your applications in a very straightforward way.

It's build with Nginx/OpenResty, Lapis and Docker. This enables the service to be very performant and requires only minimal system resources.

Features

Getting started

  • Install (if you don't have them):
  • Setup required environment variables
  • Run in development mode:
    • Run the application with docker-compose -f docker-compose-dev.yml up
  • Run in production mode:
    • Run the application with docker-compose up
  • Once micro-auth is running, you can point your login to one of the following urls (URLs are for development mode):
    • http://localhost:8080/auth/github: For GitHub login
    • http://localhost:8080/auth/google: For Google login

Authentication Services

Google

Setup

Visit Google Developers Console and create a new application on Google. Then go to Credentials and create a new OAuth Client ID. Now, get the Client ID and Client secret.

Endpoints

  • http://localhost:8080/auth/google: Endpoint for Google authentication. Point your application to this endpoint to login with Google.

Results

After successful authentication with Google the user is redirect to the URL specified in GOOGLE_REDIRECT_URL with the access token saved in the access_token query parameter.

GitHub

Setup

Visit GitHub and create a new application on GitHub to get your client id and secret.

Endpoints

  • http://localhost:8080/auth/github: Endpoint for GitHub authentication. Point your application to this endpoint to login with Github.

Results

After successful authentication with GitHub the user is redirect to the URL specified in GITHUB_REDIRECT_URL with the access token saved in the access_token query parameter.

Environment variables

To use the service you must set some required environment variables. These variables can be set in the .env file. Just copy .env.example to .env

$ cp .env.example .env

end set the required variables.

Secrets in docker swarm

Setting the above environment variables with _FILE pointed at the secret mount inside the container. -e GOOGLE_SECRET_FILE=/run/secrets/google_secret. This will set the contents on the file as the value of the environment variable.

General

  • APP_URL: Specify the URL of micro-auth (default: http://localhost:8080 in development mode). The APP_URL must be set in production mode.

Google

  • GOOGLE_CLIENT_ID: The Google application client id (required)
  • GOOGLE_CLIENT_SECRET: The Google application client secret (required)
  • GOOGLE_REDIRECT_URL: The url to redirect the user once the authentication was successful

GitHub

  • GITHUB_CLIENT_ID: The GitHub application client id (required)
  • GITHUB_CLIENT_SECRET: The GitHub application client secret (required)
  • GITHUB_REDIRECT_URL: The url to redirect the user once the authentication was successful

License

See LICENSE

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].