Skip to content

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.

License

Notifications You must be signed in to change notification settings

open-template-hub/auth-server-template

Repository files navigation

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.

About

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.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published