{"id":22390199,"url":"https://github.com/oauth-everything/passport-deviantart","last_synced_at":"2025-10-30T19:08:56.671Z","repository":{"id":35102952,"uuid":"207001154","full_name":"oauth-everything/passport-deviantart","owner":"oauth-everything","description":"A Passport strategy for authenticating with https://www.deviantart.com/","archived":false,"fork":false,"pushed_at":"2022-02-12T13:27:09.000Z","size":51,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T09:19:52.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oauth-everything.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-07T17:16:40.000Z","updated_at":"2022-05-23T20:11:48.000Z","dependencies_parsed_at":"2022-08-08T05:01:15.047Z","dependency_job_id":null,"html_url":"https://github.com/oauth-everything/passport-deviantart","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauth-everything%2Fpassport-deviantart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauth-everything%2Fpassport-deviantart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauth-everything%2Fpassport-deviantart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oauth-everything%2Fpassport-deviantart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oauth-everything","download_url":"https://codeload.github.com/oauth-everything/passport-deviantart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245623030,"owners_count":20645681,"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-12-05T03:14:35.104Z","updated_at":"2025-10-30T19:08:56.564Z","avatar_url":"https://github.com/oauth-everything.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"@oauth-everything/passport-deviantart\n=====================================\n\nA [Passport](http://passportjs.org/) strategy for authenticating with\n[Deviantart](https://www.deviantart.com/) using OAuth 2.0 and the Deviantart API.\n\nThis module lets you authenticate using Deviantart in your Node.js applications.\nBy plugging into Passport, Deviantart authentication can be easily and\nunobtrusively integrated into any application or framework that supports\n[Connect](https://www.senchalabs.org/connect/)-style middleware, including\n[Express](https://expressjs.com/).\n\n## Install\n\n```bash\n$ npm install @oauth-everything/passport-deviantart\n```\n#### Configure Strategy\n\nThe Deviantart authentication strategy authenticates users using a Deviantart\naccount and OAuth 2.0 tokens.  The app ID and secret obtained when creating an\napplication are supplied as options when creating the strategy.  The strategy\nalso requires a `verify` callback, which receives the access token and optional\nrefresh token, as well as `profile` which contains the authenticated user's\nDeviantart profile.  The `verify` callback must call `cb` providing a user to\ncomplete authentication.\n\n```ts\npassport.use(new Strategy(\n    {\n        clientID: DEVIANTART_APP_ID,\n        clientSecret: DEVIANTART_APP_SECRET,\n        callbackURL: \"http://localhost:3000/auth/deviantart/callback\"\n    },\n    (accessToken: string, refreshToken: string, profile: Profile, cb: VerifyCallback\u003cUser\u003e) =\u003e {\n\n        User.findOrCreate({ deviantartId: profile.id }, (err: Error, user: User) =\u003e {\n            return cb(err, user);\n        });\n\n    }\n));\n```\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'deviantart'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](https://expressjs.com/)\napplication:\n\n```javascript\napp.get('/auth/deviantart',\n  passport.authenticate('deviantart'));\n\napp.get('/auth/deviantart/callback',\n  passport.authenticate('deviantart', { failureRedirect: '/login' }),\n  function(req, res) {\n    // Successful authentication, redirect home.\n    res.redirect('/');\n  });\n```\n\n## License\n\n[The MPL v2 License](https://opensource.org/licenses/MPL-2.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foauth-everything%2Fpassport-deviantart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foauth-everything%2Fpassport-deviantart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foauth-everything%2Fpassport-deviantart/lists"}