Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robertoachar/playground-koa-auth
A playground for Koa with authentication and authorization.
https://github.com/robertoachar/playground-koa-auth
authentication authorization jwt koa koa-bodyparser koa-helmet koa-router login mongodb node playground signup
Last synced: 8 days ago
JSON representation
A playground for Koa with authentication and authorization.
- Host: GitHub
- URL: https://github.com/robertoachar/playground-koa-auth
- Owner: robertoachar
- License: mit
- Created: 2019-04-26T15:44:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-26T18:42:01.000Z (over 5 years ago)
- Last Synced: 2024-11-13T21:15:02.953Z (about 2 months ago)
- Topics: authentication, authorization, jwt, koa, koa-bodyparser, koa-helmet, koa-router, login, mongodb, node, playground, signup
- Language: JavaScript
- Size: 9.77 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# playground-koa-auth
Generated by [Node Project Generator](https://github.com/robertoachar/generator-node).
[![License][license-badge]][license-url]
> A playground for Koa with Authentication and Authorization.
## Development
- Clone the repo
```bash
$ git clone https://github.com/robertoachar/playground-koa-auth.git
```- Install dependencies
```bash
$ npm install
```- Run scripts
| Action | Usage |
| ---------------------- | -------------- |
| Start development mode | `npm start` |
| Lint code | `npm run lint` |## Environment
```yaml
# .env file
NODE_ENV = development
DATABASE = mongodb://localhost:27017/playground-koa-auth
PORT = 3000
JWT_SECRET = secret
```## Endpoints
| Method | Endpoint | Description |
| ------ | --------------- | ------------------------------------ |
| POST | `/auth/signup` | Create an account |
| POST | `/auth/login` | Log In |
| GET | `/auth/profile` | User profile (must be authenticated) |## Author
[Roberto Achar](https://twitter.com/robertoachar)
## License
[MIT](https://github.com/robertoachar/playground-koa-auth/blob/master/LICENSE)
[license-badge]: https://img.shields.io/github/license/robertoachar/playground-koa-auth.svg
[license-url]: https://opensource.org/licenses/MIT