An Typescript authentication service bootstrap built with Passport and Oauth2orize. User sessions are stored in a Redis cache with user database managed by TypeORM.
- Make sure you have at least
node v10.13.0+
andyarn v1.13.0+
installed. - Make sure you have both Redis and a relational database installed locally and running.
- Clone the repo
$ git clone https://github.com/flamingYawn/oauthentic.git
$ cd oauthentic
- Install dependencies
$ yarn
- Install
ts-node
andtypeorm
globally
$ yarn global add ts-node typeorm
- Create a new database named
oauth
in whatever RDB you're using. - Replace the example environment variables in
.env
. - Start the server for the first time
$ yarn start
- Run the initial DB migration
$ typeorm migration:run
And then you should be good to go.