{"id":24915625,"url":"https://github.com/bachp/passport-xing","last_synced_at":"2025-07-07T03:09:48.983Z","repository":{"id":6634341,"uuid":"7878296","full_name":"bachp/passport-xing","owner":"bachp","description":"Xing authentication strategy for Passport and Node.js.","archived":false,"fork":false,"pushed_at":"2015-09-20T10:52:55.000Z","size":317,"stargazers_count":12,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T14:09:27.572Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/bachp.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":"2013-01-28T20:31:25.000Z","updated_at":"2019-11-21T00:17:37.000Z","dependencies_parsed_at":"2022-08-19T18:31:28.998Z","dependency_job_id":null,"html_url":"https://github.com/bachp/passport-xing","commit_stats":null,"previous_names":["pascal-bach/passport-xing"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/bachp/passport-xing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fpassport-xing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fpassport-xing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fpassport-xing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fpassport-xing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bachp","download_url":"https://codeload.github.com/bachp/passport-xing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bachp%2Fpassport-xing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264005540,"owners_count":23542831,"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":"2025-02-02T07:18:44.203Z","updated_at":"2025-07-07T03:09:48.970Z","avatar_url":"https://github.com/bachp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Passport-Xing\n\n[Passport](http://passportjs.org/) strategy for authenticating with [Xing](http://www.xing.com/)\nusing the OAuth 1.0a API.\n\nThis module lets you authenticate using Xing in your Node.js applications.\nBy plugging into Passport, Xing 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## Installation\n\n    $ npm install passport-xing\n\n## Usage\n\nIn order to use this strategy please make sure your Xing application has at \nleast the *App User Details* access rights. This access rights can be set\nif a production key is generated on the Xing Developer site.\n\n#### Configure Strategy\n\nThe Xing authentication strategy authenticates users using a Xing\naccount and OAuth tokens.  The strategy requires a `verify` callback, which\naccepts these credentials and calls `done` providing a user, as well as\n`options` specifying a consumer key, consumer secret, and callback URL.\n\n    passport.use(new XingStrategy({\n        consumerKey: XING_API_KEY,\n        consumerSecret: XING_SECRET_KEY,\n        callbackURL: \"http://127.0.0.1:3000/auth/xing/callback\"\n      },\n      function(token, tokenSecret, profile, done) {\n        User.findOrCreate({ xingId: profile.id }, function (err, user) {\n          return done(err, user);\n        });\n      }\n    ));\n\n#### Authenticate Requests\n\nUse `passport.authenticate()`, specifying the `'xing'` strategy, to\nauthenticate requests.\n\nFor example, as route middleware in an [Express](http://expressjs.com/)\napplication:\n\n    app.get('/auth/xing',\n      passport.authenticate('xing'));\n    \n    app.get('/auth/xing/callback', \n      passport.authenticate('xing', { failureRedirect: '/login' }),\n      function(req, res) {\n        // Successful authentication, redirect home.\n        res.redirect('/');\n      });\n      \n#### Profile Fields\n\nThe Xing profile is very rich, and may contain a lot of information.  The\nstrategy can be configured with a `profileFields` parameter which specifies a\nlist of fields your application needs.  For example, to fetch the user's ID, name and\nemail address, configure strategy like this.\n\n    passport.use(new XingStrategy({\n        // clientID, clientSecret and callbackURL\n        profileFields: ['id', 'first_name', 'last_name', 'active_email']\n      },\n      // verify callback\n    ));\n\nby default the following fields will be fetched form Xing: `id,first_name,last_name,display_name,active_email,page_name,permalink,gender,photo_urls,birth_date`\n\n## Examples\n\nFor a complete, working example, refer to the [login example](https://github.com/pascal-bach/passport-xing/tree/master/examples/login).\n\n## Tests\n\n    $ npm install\n    $ make test\n\n[![Build Status](https://travis-ci.org/pascal-bach/passport-xing.png?branch=master)](https://travis-ci.org/pascal-bach/passport-xing)\n\n## Credits\n\n  - [Jared Hanson](https://github.com/jaredhanson)\n  - [Janett Michaylow](https://github.com/jmichaylow)\n  - [Pascal Bach](https://github.com/pascal-bach)\n\n## License\n\n[The MIT License](http://opensource.org/licenses/MIT)\n\nCopyright (c) 2011 Jared Hanson  \nCopyright (c) 2012 Janett Michaylow  \nCopyright (c) 2013 Pascal Bach  \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachp%2Fpassport-xing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbachp%2Fpassport-xing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbachp%2Fpassport-xing/lists"}