{"id":19874447,"url":"https://github.com/strongloop/loopback-component-oauth2","last_synced_at":"2025-04-09T23:17:53.326Z","repository":{"id":66071270,"uuid":"6743612","full_name":"strongloop/loopback-component-oauth2","owner":"strongloop","description":"oAuth 2.0 server for LoopBack","archived":false,"fork":false,"pushed_at":"2019-11-19T16:26:17.000Z","size":1149,"stargazers_count":62,"open_issues_count":0,"forks_count":60,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-04-09T23:17:47.750Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.strongloop.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/strongloop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":"support/mk/coveralls.mk","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-11-18T04:52:24.000Z","updated_at":"2023-02-04T19:38:09.000Z","dependencies_parsed_at":"2023-03-10T23:36:15.802Z","dependency_job_id":null,"html_url":"https://github.com/strongloop/loopback-component-oauth2","commit_stats":{"total_commits":375,"total_committers":33,"mean_commits":"11.363636363636363","dds":0.5146666666666666,"last_synced_commit":"c87e35633d7e7aaef1265340827ba0fa4cf53cc3"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strongloop%2Floopback-component-oauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strongloop%2Floopback-component-oauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strongloop%2Floopback-component-oauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/strongloop%2Floopback-component-oauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/strongloop","download_url":"https://codeload.github.com/strongloop/loopback-component-oauth2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125593,"owners_count":21051771,"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-11-12T16:23:19.729Z","updated_at":"2025-04-09T23:17:53.299Z","avatar_url":"https://github.com/strongloop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# loopback-component-oauth2\n\nThe LoopBack oAuth 2.0 component provides full integration between [OAuth 2.0](http://tools.ietf.org/html/rfc6749)\nand [LoopBack](http://loopback.io). It enables LoopBack applications to function\nas an oAuth 2.0 provider to authenticate and authorize client applications and/or\nresource owners (i.e. users) to access protected API endpoints.\n\nThe oAuth 2.0 protocol implementation is based on [oauth2orize](https://github.com/jaredhanson/oauth2orize)\nand [passport](http://passportjs.org/). \n\nSee [LoopBack Documentation - OAuth 2.0 Component](http://loopback.io/doc/en/lb2/OAuth-2.0.html) for more information.\n\n## Install\n\nInstall the component as usual:\n\n```\n$ npm install loopback-component-oauth2\n```\n\n## Use\n\nUse in an application as follows:\n\n```js\nvar oauth2 = require('loopback-component-oauth2');\n\nvar options = { \n  dataSource: app.dataSources.db, // Data source for oAuth2 metadata persistence\n  loginPage: '/login', // The login page url\n  loginPath: '/login' // The login form processing url\n};\n\noauth2.oAuth2Provider(\n  app, // The app instance\n  options // The options\n);\n```\n\nThe app instance will be used to set up middleware and routes. The data source\nprovides persistence for the oAuth 2.0 metadata models.\n\nFor more information, see [OAuth 2.0](http://loopback.io/doc/en/lb2/OAuth-2.0.html) LoopBack component official documentation.\n\n## Example\n\nThis [example](https://github.com/strongloop/strong-gateway) demonstrates\nhow to implement an OAuth service provider, complete with protected API access.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrongloop%2Floopback-component-oauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstrongloop%2Floopback-component-oauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstrongloop%2Floopback-component-oauth2/lists"}