{"id":42088482,"url":"https://github.com/delta/passport-delta-oauth2","last_synced_at":"2026-01-26T10:34:48.159Z","repository":{"id":57319991,"uuid":"402761921","full_name":"delta/passport-delta-oauth2","owner":"delta","description":"Passport strategy for authenticating with DAuth using the OAuth 2.0 API.","archived":false,"fork":false,"pushed_at":"2021-09-04T13:55:40.000Z","size":11,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":24,"default_branch":"main","last_synced_at":"2025-11-28T19:33:54.753Z","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/delta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-03T12:25:42.000Z","updated_at":"2022-01-26T04:44:53.000Z","dependencies_parsed_at":"2022-08-26T01:11:15.444Z","dependency_job_id":null,"html_url":"https://github.com/delta/passport-delta-oauth2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/delta/passport-delta-oauth2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delta%2Fpassport-delta-oauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delta%2Fpassport-delta-oauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delta%2Fpassport-delta-oauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delta%2Fpassport-delta-oauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/delta","download_url":"https://codeload.github.com/delta/passport-delta-oauth2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/delta%2Fpassport-delta-oauth2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28774713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T09:42:00.929Z","status":"ssl_error","status_checked_at":"2026-01-26T09:42:00.591Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-26T10:34:48.094Z","updated_at":"2026-01-26T10:34:48.152Z","avatar_url":"https://github.com/delta.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# passport-delta-oauth2\n\n[Passport](https://passportjs.org/) strategy for authenticating with [DAuth](https://auth.delta.nitt.edu/)\nusing the OAuth 2.0 API.\n\nThis module lets you authenticate using DAuth in your Node.js applications.\nBy plugging into Passport, DAuth authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](http://www.senchalabs.org/connect/)-style middleware, including\n[Express](http://expressjs.com/).\n\n## Install\n\n```bash\n$ npm install passport-delta-oauth2\n```\n\n## Usage\n\n#### Create an Application\n\nBefore using `passport-delta-oauth2`, you must register an application with\nDAuth. Refer [DAuth Documentation](https://delta.github.io/DAuth-Docs) for more information.\n\n#### Configure Strategy\n\nThe DAuth authentication strategy authenticates users using a DAuth account and OAuth 2.0 tokens.  The client ID and secret obtained when creating an application are supplied as options when creating the strategy.  The strategy also requires a `verify` callback, which receives the access token and optional refresh token, as well as `profile` which contains the authenticated user's DAuth profile.  The `verify` callback must call `cb` providing a user to complete authentication.\n\n```javascript\nvar DAuthStrategy = require('passport-delta-oauth2');\n\npassport.use(new DAuthStrategy(\n    {\n        clientID: DAUTH_CLIENT_ID,\n        clientSecret: DAUTH_CLIENT_SECRET,\n        callbackURL: \"http://www.example.com/auth/dauth/callback\"\n    },\n    function(accessToken, refreshToken, profile, cb) {\n        User.findOrCreate({ email: profile.email }, function (err, user) {\n        return cb(err, user);\n        });\n    }\n));\n```\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'dauth'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n```javascript\napp.get(\n    '/auth/dauth/callback', \n    passport.authenticate('dauth', { failureRedirect: '/login' }),\n    function(req, res) {\n        // Successful authentication, redirect home.\n        res.redirect('/');\n    }\n);\n```\n\n## Examples\n\n* [express-passport-dauth-example](https://github.com/delta/express-passport-dauth-example)\n\n  Illustrates how to use the DAuth strategy within an [Express](https://expressjs.com)\n  application.\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\n## Contributors\n\n- Aananth V (aananthv)\n\nCopyleft (c) 2021 [Delta Force](https://delta.nitt.edu)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelta%2Fpassport-delta-oauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdelta%2Fpassport-delta-oauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdelta%2Fpassport-delta-oauth2/lists"}