Coder Social home page Coder Social logo

piaobeiyi / waline-auth Goto Github PK

View Code? Open in Web Editor NEW

This project forked from walinejs/auth

0.0 0.0 1.0 195 KB

This project adds Docker deployment to walinejs/auth and modifies the data storage to sqlite3

Home Page: auth-center.vercel.app

JavaScript 99.35% Dockerfile 0.65%

waline-auth's Introduction

walinejs/auth is a project that provides social login authentication services for walinejs/waline, including GitHub, Twitter, Facebook, Google, Weibo, QQ.

This project adds Docker deployment to walinejs/auth and modifies the data storage to sqlite3.

If you want to display your website's relevant information when users login, as shown in the following image, you can use this project to privately deploy the authentication service through Docker.

excample

Docker deployment:

version: '3'
services:
  waline-auth:
    build: ./
    ports:
      - 8081:8081
    volumes:
      - /path/to/db:/db
    environment:
      GITHUB_ID: xxxxxxx
      GITHUB_SECRET: xxxxxx
      TWITTER_ID: xxxxx
      TWITTER_SECRET: xxxxxxxxx

Please modify the ports,volumes and environment to your own values.

Explanation of Environment Variables

GitHub

GITHUB_ID and GITHUB_SECRET enviroment variables are required.

  • Redirect URL: <a href="<serverUrl>/github?redirect=&state=">Login with GitHub</a>
  • Get user info: GET <serverUrl>/github?code=

Twitter

TWITTER_ID and TWITTER_SECRET environment variables are required.

  • Redirect URL: <a href="<serverUrl>/twitter?redirect=&state=">Login with Twitter</a>
  • Get user info: GET <serverUrl>/twitter?oauth_token=&oauth_verifier

Facebook

FACEBOOK_ID and FACEBOOK_SECRET enviroment variables are required.

  • Redirect URL: <a href="<serverUrl>/facebook?redirect=&state=">Login with Facebook</a>
  • Get user info: GET <serverUrl>/facebook?code=

Google

GOOGLE_ID and GOOGLE_SECRET enviroment variables are required.

  • Redirect URL: <a href="<serverUrl>/google?redirect=&state=">Login with Google</a>
  • Get user info: GET <serverUrl>/google?code=

Weibo

WEIBO_ID and WEIBO_SECRET enviroment variables are required.

  • Redirect URL: <a href="<serverUrl>/weibo?redirect=&state=">Login with Weibo</a>
  • Get user info: GET <serverUrl>/weibo?code=

QQ

QQ_ID and QQ_SECRET environment variables are required.

  • Redirect URL: <a href="<serverUrl>/qq?redirect=&state=">Login with QQ</a>
  • Get user info: GET <serverUrl>/qq?code=

Nginx Proxy configuration

location / {
    proxy_pass http://127.0.0.1:8081;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
    proxy_set_header x-forwarded-proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

waline-auth's People

Contributors

lizheming avatar renovate-bot avatar renovate[bot] avatar starrah avatar

Forkers

nghiamaster

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.