Code Monkey home page Code Monkey logo

open-template-hub / auth-server-template Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 3.0 538 KB

Auth Server Template is a generic open-source authentication server that has a simple yet powerful design to connect your business with all OAuth 2.0 and OAuth supporting third-party companies (like Google, Facebook, Twitter, or LinkedIn). It also supports a basic username-password authentication system.

Home Page: https://opentemplatehub.com/product/server/auth-server-template

License: MIT License

TypeScript 20.84% HTML 78.72% Shell 0.44%
authentication server template nodejs express nodejs-express oauth oauth2 social-login facebook-login

auth-server-template's Introduction

Logo

Open Template Hub - Auth Server Template v5

License Issues PRCLosed LastCommit Release SonarCloud Postman

Auth Server Template is a generic open-source authentication server that has a simple yet powerful design to connect your business with all OAuth 2.0 and OAuth supporting third-party companies (like Google, Facebook, Twitter, or LinkedIn). It also supports a basic username-password authentication system.

Ways to Begin

1. Express Deploy

Deploy this template to Heroku

Deploy

2. Start with Server Generator

Create your server with Server Generator Package

NPM

3. GitHub Template

Use this repository as a Template

GitHubTemplate

Installations

Install nodejs and npm via nodejs.org.

Check installed versions of nodejs and npm via running following commands:

node -v
npm -v

Check project's current nodejs and npm version from package.json.

Environment Variables

If you don't give RESPONSE_ENCRYPTION_SECRET, response encryption mechanism will be disabled automatically.

PORT=4001

PROJECT=OTH
MODULE=AuthServer
ENVIRONMENT=Local

CLIENT_URL=http://localhost:4200
ADMIN_CLIENT_URLS="http://localhost:4202"

DATABASE_URL={Database Connection Url}
POSTGRESQL_CONNECTION_LIMIT={Postgresql Connection Limit}

MONGODB_URI={Database Connection Url}
MONGODB_CONNECTION_LIMIT={MongoDB Connection Limit}

CLOUDAMQP_APIKEY={MQ Api Key}
CLOUDAMQP_URL={MQ Connection Url}

AUTH_SERVER_QUEUE_CHANNEL=oth_auth_queue
ORCHESTRATION_SERVER_QUEUE_CHANNEL=oth_orchestration_queue

REDISCLOUD_URL={Redis Connection Url}
REDIS_CONNECTION_LIMIT={Redis Connection Limit}

AUTO_VERIFY=false

ACCESS_TOKEN_EXPIRE=1hour
ACCESS_TOKEN_SECRET={Access Token Secret}

REFRESH_TOKEN_EXPIRE=30days
REFRESH_TOKEN_SECRET={Refresh Token Secret}

JOIN_TEAM_TOKEN_EXPIRE=10days
JOIN_TEAM_TOKEN_SECRET={Join Team Token Secret}

RESET_PASSWORD_TOKEN_EXPIRE=1day
RESET_PASSWORD_TOKEN_SECRET={Reset Token Secret}

VERIFICATION_TOKEN_SECRET={Verification Token Secret

RESPONSE_ENCRYPTION_SECRET={Response Encryption Secret}

PREAUTH_TOKEN_SECRET={Pre Auth Token Secret}

TWO_FACTOR_EXPIRE=90
TWO_FACTOR_CODE_LENGTH=5
TWO_FACTOR_CODE_TYPE=numeric

Social Login Configurations

To be able to use social login mechanism, refer to SOCIAL_LOGIN.md file.


Postman Regression Tests

To be able to configure regression tests, refer to REGRESSION_TESTS.md file.


Http Requests

You can find list of available http request in the requests directory. You can run http requests directly via WebStorm, for more information check out: jetbrains.com/help/idea/http-client-in-product-code-editor.html

Contributors


Furkan Yavuz

๐Ÿ’ฌ ๐Ÿ“– ๐Ÿ‘€

Fatih Turker

๐Ÿ’ฌ ๐Ÿ“– ๐Ÿ‘€

Mert Sarac

๐Ÿ’ฌ ๐Ÿ“– ๐Ÿ‘€

Contributing

Refer to CONTRIBUTING.md to see how to contribute to Open Template Hub.


Code of Conduct

Refer to CODE_OF_CONDUCT.md to see contributor covenant code of conduct.


LICENSE

The source code for this project is released under the MIT License.

auth-server-template's People

Contributors

dependabot[bot] avatar fatihturker avatar furknyavuz avatar gh-action-bump-version avatar mertlsarac avatar oth-service-user avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

auth-server-template's Issues

2022 Week 4

Logo

Open Template Hub - Feature Request

Description

  1. auth server, get language code from api
  2. update readme files

Supplementary Info

Links, images, screenshots etc.

othOpen Template Hub ยฉ 2021

Version Generator

  1. {ACTION_ITEM}
  • {CONDITION}

Supplementary Info

Click images below for more information about planned result

logo

Test workflow

  1. {DEPENDENCY_NAME}
  • {CONDITION}

Supplementary Info

Click images below for more information about planned result

logo

Test Feature

  1. {ACTION_ITEM}
  • {CONDITION}

Supplementary Info

Click images below for more information about planned result

logo

Investigate Google Authenticator

Logo

Open Template Hub - Feature Request

Description

Define the feature clearly

Supplementary Info

Links, images, screenshots etc.

othOpen Template Hub ยฉ 2021

Test Workflow

{BUG_DESCRIPTION}

Supplementary Info

Click images below for more information about the bug

logo

Test issue

{BUG_DESCRIPTION}

Supplementary Info

Click images below for more information about the bug

logo

Test milestone flow

{BUG_DESCRIPTION}

Supplementary Info

Click images below for more information about the bug

logo

Test workflow

{BUG_DESCRIPTION}

Supplementary Info

Click images below for more information about the bug

logo

Build 2FA Mechanism

Logo

Open Template Hub - Feature Request

Description

Define the feature clearly

Supplementary Info

Links, images, screenshots etc.

othOpen Template Hub ยฉ 2021

Heroku app crashes due to MongooseError

Logo

Open Template Hub - Bug Report

Description

I wanted to try auth-server-template.

  1. Using the "Deploy to HEROKU" link in README.md file, I created my account and application in Heroku
  2. Sent a couple random request to my app and got 503
  3. Opened application logs on Heroku and Restarted all dynos
  4. Saw application crashed log right after application started (detailed log below)

Supplementary Info

2023-01-24T03:10:49.019588+00:00 heroku[web.1]: State changed from crashed to starting

2023-01-24T03:10:53.050623+00:00 heroku[web.1]: Starting process with command `npm start`

2023-01-24T03:10:56.008450+00:00 app[web.1]: 

2023-01-24T03:10:56.008478+00:00 app[web.1]: > [email protected] start

2023-01-24T03:10:56.008479+00:00 app[web.1]: > node version-generator.ts > ./version.ts && ts-node auth-server.main.ts

2023-01-24T03:10:56.008479+00:00 app[web.1]: 

2023-01-24T03:11:00.384906+00:00 heroku[web.1]: Process exited with status 1

2023-01-24T03:11:00.205906+00:00 app[web.1]: MongoDB Preloaded Successfully.

2023-01-24T03:11:00.217972+00:00 app[web.1]: PostgreSQL Loaded Successfully.

2023-01-24T03:11:00.220479+00:00 app[web.1]: MQ Loaded Successfully.

2023-01-24T03:11:00.223707+00:00 app[web.1]: Auth Server is running on port 7475

2023-01-24T03:11:00.223898+00:00 app[web.1]: Startup Memory Usage: 165.07 MB

2023-01-24T03:11:00.229103+00:00 app[web.1]: /app/node_modules/mongoose/lib/connection.js:695

2023-01-24T03:11:00.229104+00:00 app[web.1]:     throw new MongooseError('The `uri` parameter to `openUri()` must be a ' +

2023-01-24T03:11:00.229104+00:00 app[web.1]:           ^

2023-01-24T03:11:00.230249+00:00 app[web.1]: MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.

2023-01-24T03:11:00.230249+00:00 app[web.1]:     at NativeConnection.Connection.openUri (/app/node_modules/mongoose/lib/connection.js:695:11)

2023-01-24T03:11:00.230250+00:00 app[web.1]:     at Mongoose.createConnection (/app/node_modules/mongoose/lib/index.js:351:10)

2023-01-24T03:11:00.230250+00:00 app[web.1]:     at /app/node_modules/@open-template-hub/common/lib/provider/mongo.provider.ts:35:34

2023-01-24T03:11:00.230251+00:00 app[web.1]:     at processTicksAndRejections (node:internal/process/task_queues:95:5)

2023-01-24T03:11:00.436511+00:00 heroku[web.1]: State changed from starting to crashed
othOpen Template Hub ยฉ 2023

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.