https://github.com/dozoisch/koa-passport-example
Example using Koa and Passport, for a more in depth example see my repo /dozoisch/koa-react-full-example
https://github.com/dozoisch/koa-passport-example
Last synced: over 1 year ago
JSON representation
Example using Koa and Passport, for a more in depth example see my repo /dozoisch/koa-react-full-example
- Host: GitHub
- URL: https://github.com/dozoisch/koa-passport-example
- Owner: dozoisch
- License: mit
- Created: 2014-06-21T20:37:24.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-21T20:53:16.000Z (about 12 years ago)
- Last Synced: 2025-03-27T02:06:11.421Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://www.dozoisch.com/integrating-passportjs-with-koa/
- Size: 141 KB
- Stars: 14
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE
Awesome Lists containing this project
README
# Koa Passport Example
This is a small repo meant to show a minimal Koa Passport example using bcrypt. For a full example with react see [Koa-React-Full-Example](https://github.com/dozoisch/koa-passport-example). This repo was created to be used as example project for a blog post -- see http://www.dozoisch.com/integrating-passportjs-with-koa/.
## Installation & Run
```sh
#Install deps
npm i
# To run tests
npm test
# To start the project on localhost:3000
npm start
```
##Usage
To try it, first run npm i, then you can wether run the tests with `npm test` or try it yourself `npm start`. You will need to go to `localhost:3000/user/:username/:password` to create the first user. You can then try to log him in. Go to `localhost:3000`, you should be redirected to `/login` where you can enter the credentials of the newly created user. You will then be redirected to the secured zone!