yamlakkassahun / auth-server-template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

Open Template Hub - Auth Server Template v4

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"
CLIENT_RESET_PASSWORD_URL=http://localhost:4200/reset-password
CLIENT_VERIFICATION_SUCCESS_URL=http://localhost:4200/verify-account

DATABASE_URL={Database Connection Url}
POSTGRESQL_CONNECTION_LIMIT={Postgresql 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

AUTO_VERIFY=false

ACCESS_TOKEN_EXPIRE=1hour
ACCESS_TOKEN_SECRET={Access Token Secret}

REFRESH_TOKEN_EXPIRE=30days
REFRESH_TOKEN_SECRET={Refresh 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.

About

License:MIT License


Languages

Language:HTML 78.8%Language:TypeScript 20.7%Language:Shell 0.4%