{"id":18821141,"url":"https://github.com/compwright/oauth2-server-jwt","last_synced_at":"2025-04-14T00:26:28.628Z","repository":{"id":52087005,"uuid":"143675858","full_name":"compwright/oauth2-server-jwt","owner":"compwright","description":"Storageless JWT token generator backend for oauth2-server","archived":false,"fork":false,"pushed_at":"2025-02-25T14:24:52.000Z","size":529,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T14:47:44.656Z","etag":null,"topics":["jwt","oauth2-server"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/oauth2-server-jwt","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/compwright.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"compwright"}},"created_at":"2018-08-06T04:19:57.000Z","updated_at":"2025-02-25T14:24:49.000Z","dependencies_parsed_at":"2024-06-21T08:57:15.154Z","dependency_job_id":null,"html_url":"https://github.com/compwright/oauth2-server-jwt","commit_stats":{"total_commits":39,"total_committers":5,"mean_commits":7.8,"dds":0.3589743589743589,"last_synced_commit":"25b685a56950b4357585df95a750ede9c322b3fe"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Foauth2-server-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Foauth2-server-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Foauth2-server-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/compwright%2Foauth2-server-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/compwright","download_url":"https://codeload.github.com/compwright/oauth2-server-jwt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497810,"owners_count":21113984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jwt","oauth2-server"],"created_at":"2024-11-08T00:34:33.221Z","updated_at":"2025-04-14T00:26:28.591Z","avatar_url":"https://github.com/compwright.png","language":"JavaScript","funding_links":["https://github.com/sponsors/compwright"],"categories":[],"sub_categories":[],"readme":"# oauth2-server-jwt\n\n[![Build Status](https://app.travis-ci.com/compwright/oauth2-server-jwt.svg?branch=master)](https://app.travis-ci.com/compwright/oauth2-server-jwt)\n[![Download Status](https://img.shields.io/npm/dm/oauth2-server-jwt.svg?style=flat-square)](https://www.npmjs.com/package/oauth2-server-jwt)\n[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor\u0026message=❤\u0026logo=GitHub\u0026link=https://github.com/sponsors/compwright)](https://github.com/sponsors/compwright)\n\nStorageless JWT token generator backend for [oauth2-server](https://github.com/compwright/node-oauth2-server)\n\n## Features\n\n* Respects oauth2-server token lifetime configuration for each type of token\n* Generates JWT access tokens, refresh tokens, and authorization codes\n\n## Limitations\n\nFor proper verification of `aud`, `scope`, and `redirectUri`, you will need to implement [`model.getClient()`](https://oauth2-server.readthedocs.io/en/latest/model/spec.html#getclient-clientid-clientsecret-callback) separately.\n\nIf you need to support the `password` grant type, you will also need to implement [`model.getUser()`](https://oauth2-server.readthedocs.io/en/latest/model/spec.html#getuser-username-password-callback) separately.\n\nSuggested implementation: [oauth2-server-mongoose](https://github.com/compwright/oauth2-server-mongoose)\n\n## Requirements\n\n* Node.js 12+\n* [oauth2-server](https://github.com/compwright/node-oauth2-server)\n\n## Installation\n\n```bash\n$ npm install --save @compwright/oauth2-server oauth2-server-jwt\n```\n\n## Usage\n\n```javascript\nconst OAuth2Server = require('@compwright/oauth2-server');\nconst jwtMixin = require('oauth2-server-jwt');\nconst mongooseMixin = require('oauth2-server-mongoose');\n\nconst oauth = new OAuth2Server({\n    model: {\n        ...jwtMixin({\n            accessTokenSecret,                  // String (required)\n            refreshTokenSecret,                 // String (required)\n            authorizationCodeSecret,            // String (required)\n            issuer,                             // String (required)\n            userId: 'id'                        // String\n            algorithms: ['HS256']               // Array[String]\n        }),\n        ...mongooseMixin()\n    }\n});\n```\n\n## License\n\nMIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Foauth2-server-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcompwright%2Foauth2-server-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcompwright%2Foauth2-server-jwt/lists"}