{"id":14384420,"url":"https://github.com/oauthjs/express-oauth-server","last_synced_at":"2025-04-12T18:47:14.190Z","repository":{"id":3229947,"uuid":"46312428","full_name":"oauthjs/express-oauth-server","owner":"oauthjs","description":"Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js","archived":false,"fork":false,"pushed_at":"2024-01-03T22:52:35.000Z","size":56,"stargazers_count":494,"open_issues_count":54,"forks_count":386,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-10T13:16:14.425Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/oauthjs.png","metadata":{"files":{"readme":"Readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2015-11-17T00:31:37.000Z","updated_at":"2025-04-05T18:59:23.000Z","dependencies_parsed_at":"2024-01-14T20:16:10.852Z","dependency_job_id":"f25533ec-b9f5-46fe-aa50-bae2a4eecf3e","html_url":"https://github.com/oauthjs/express-oauth-server","commit_stats":{"total_commits":41,"total_committers":11,"mean_commits":3.727272727272727,"dds":"0.46341463414634143","last_synced_commit":"844d602156f4a11c09a6e3c1d63da6d2721e7e36"},"previous_names":["seegno/express-oauth-server"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauthjs%2Fexpress-oauth-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauthjs%2Fexpress-oauth-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauthjs%2Fexpress-oauth-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauthjs%2Fexpress-oauth-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oauthjs","download_url":"https://codeload.github.com/oauthjs/express-oauth-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617790,"owners_count":21134197,"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":[],"created_at":"2024-08-28T18:01:22.402Z","updated_at":"2025-04-12T18:47:14.168Z","avatar_url":"https://github.com/oauthjs.png","language":"JavaScript","readme":"# Express OAuth Server [![Build Status](https://travis-ci.org/oauthjs/express-oauth-server.png?branch=master)](https://travis-ci.org/oauthjs/express-oauth-server)\n\nComplete, compliant and well tested module for implementing an OAuth2 Server/Provider with [express](https://github.com/expressjs/express) in [node.js](http://nodejs.org/).\n\nThis is the express wrapper for [oauth2-server](https://github.com/oauthjs/node-oauth2-server).\n\n## Installation\n\n    $ npm install express-oauth-server\n\n## Quick Start\n\nThe module provides two middlewares - one for granting tokens and another to authorize them. `express-oauth-server` and, consequently `oauth2-server`, expect the request body to be parsed already.\nThe following example uses `body-parser` but you may opt for an alternative library.\n\n```js\nvar bodyParser = require('body-parser');\nvar express = require('express');\nvar OAuthServer = require('express-oauth-server');\n\nvar app = express();\n\napp.oauth = new OAuthServer({\n  model: {}, // See https://github.com/oauthjs/node-oauth2-server for specification\n});\n\napp.use(bodyParser.json());\napp.use(bodyParser.urlencoded({ extended: false }));\napp.use(app.oauth.authorize());\n\napp.use(function(req, res) {\n  res.send('Secret area');\n});\n\napp.listen(3000);\n```\n\n## Options\n\n```\nvar options = { \n  useErrorHandler: false, \n  continueMiddleware: false,\n}\n```\n* `useErrorHandler`\n(_type: boolean_ default: false)\n\n  If false, an error response will be rendered by this component.\n  Set this value to true to allow your own express error handler to handle the error.\n\n* `continueMiddleware`\n(_type: boolean default: false_)\n\n  The `authorize()` and `token()` middlewares will both render their \n  result to the response and end the pipeline.\n  next() will only be called if this is set to true.\n\n  **Note:** You cannot modify the response since the headers have already been sent.\n\n  `authenticate()` does not modify the response and will always call next()\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foauthjs%2Fexpress-oauth-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foauthjs%2Fexpress-oauth-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foauthjs%2Fexpress-oauth-server/lists"}