All Projects → gurugray → passport-yandex

gurugray / passport-yandex

Licence: MIT license
Yandex authentication strategy for Passport and Node.js.

Programming Languages

javascript
184084 projects - #8 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to passport-yandex

passport-activedirectory
Active Directory strategy for passport.js
Stars: ✭ 28 (+47.37%)
Mutual labels:  passport, strategy
Stareater
4X turn based strategy
Stars: ✭ 27 (+42.11%)
Mutual labels:  strategy
passport-oauth1
OAuth 1.0 authentication strategy for Passport and Node.js.
Stars: ✭ 23 (+21.05%)
Mutual labels:  passport
express-authentication
Simple authentication app using express, node & passport.
Stars: ✭ 58 (+205.26%)
Mutual labels:  passport
yandex-direct-api
PHP library for Yandex.Direct API v5 (abandoned)
Stars: ✭ 12 (-36.84%)
Mutual labels:  yandex
yandex-dialogs-php-sdk
PHP-библиотека для облегчения работы с диалогами от Яндекс
Stars: ✭ 23 (+21.05%)
Mutual labels:  yandex
laravel-passport-socialite
The missing social authentication plugin (i.e. SocialGrant) for laravel passport.
Stars: ✭ 50 (+163.16%)
Mutual labels:  passport
ng-nest-cnode
Angular 10 Front-End and Nestjs 7 framework Back-End build Fullstack CNode
Stars: ✭ 17 (-10.53%)
Mutual labels:  passport
pokerwars.io-starterbot-python
A starter bot written in python for the pokerwars.io platform. To play: pull this code, register on pokerwars.io, get your API token and play!
Stars: ✭ 37 (+94.74%)
Mutual labels:  strategy
IDVerification
"Very simple but works well" Computer Vision based ID verification solution provided by LibraX.
Stars: ✭ 44 (+131.58%)
Mutual labels:  passport
yandex-translate-api
A simple REST client library for Yandex.Translate
Stars: ✭ 29 (+52.63%)
Mutual labels:  yandex
express-4.x-twitter-example
Express 4.x app using Passport for sign in with Twitter.
Stars: ✭ 103 (+442.11%)
Mutual labels:  passport
NextCommunity.github.io
Join FREE: Community of open-source programmers and software engineers.
Stars: ✭ 29 (+52.63%)
Mutual labels:  strategy
sirius
Modern coffeescript/javascript framework
Stars: ✭ 20 (+5.26%)
Mutual labels:  strategy
react-node-twitter-login
Demo application that shows how to enable Twitter login with React on frontend and Node.js/Express on backend
Stars: ✭ 34 (+78.95%)
Mutual labels:  passport
passport-unique-token
Unique token authentication strategy for Passport
Stars: ✭ 35 (+84.21%)
Mutual labels:  passport
nest-auth-example
Nest.js authentication with Passport. Realworld example
Stars: ✭ 186 (+878.95%)
Mutual labels:  passport
hej
Hej! is a simple authentication boilerplate for Socialite.
Stars: ✭ 111 (+484.21%)
Mutual labels:  passport
artefactory-connectors-kit
ACK is an E(T)L tool specialized in API data ingestion. It is accessible through a Command-Line Interface. The application allows you to easily extract, stream and load data (with minimum transformations), from the API source to the destination of your choice.
Stars: ✭ 34 (+78.95%)
Mutual labels:  yandex
reactive-trader
In the coming weeks this plans to become a Gekko plugin that reacts to market changes, finding and running only the most profitable strategies.
Stars: ✭ 91 (+378.95%)
Mutual labels:  strategy

Passport-Yandex

Passport strategy for authenticating with Yandex using the OAuth 2.0 API.

This module lets you authenticate using Yandex in your Node.js applications. By plugging into Passport, Yandex authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.

Installation

$ npm install passport-yandex

Usage

Configure Strategy

The Yandex authentication strategy authenticates users using a Yandex account and OAuth 2.0 tokens. The strategy requires a verify callback, which accepts these credentials and calls done providing a user, as well as options specifying a client ID, client secret, and callback URL.

passport.use(new YandexStrategy({
    clientID: YANDEX_CLIENT_ID,
    clientSecret: YANDEX_CLIENT_SECRET,
    callbackURL: "http://127.0.0.1:3000/auth/yandex/callback"
  },
  function(accessToken, refreshToken, profile, done) {
    User.findOrCreate({ yandexId: profile.id }, function (err, user) {
      return done(err, user);
    });
  }
));

Authenticate Requests

Use passport.authenticate(), specifying the 'yandex' strategy, to authenticate requests.

For example, as route middleware in an Express application:

app.get('/auth/yandex',
  passport.authenticate('yandex'),
  function(req, res){
    // The request will be redirected to Yandex for authentication, so
    // this function will not be called.
  });

app.get('/auth/yandex/callback', 
  passport.authenticate('yandex', { failureRedirect: '/login' }),
  function(req, res) {
    // Successful authentication, redirect home.
    res.redirect('/');
  });

Examples

For a complete, working example, refer to the login example.

Tests

$ npm install --dev
$ make test

Build Status

Credits

License

(The MIT License)

Copyright (c) 2012 Sergey Sergeev

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].