GithubHelp home page GithubHelp logo

driftingshadows / omniauth-nest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vinayps/omniauth-nest

0.0 1.0 0.0 10 KB

OmniAuth Strategy for authenticating with Nest via OAuth2

License: Apache License 2.0

Ruby 100.00%

omniauth-nest's Introduction

OmniAuth Nest Strategy

Strategy to authenticate with Nest via OAuth2 in OmniAuth

For more details, read the Nest authorization documentation.

Install

Add this to your Gemfile:

gem 'omniauth-nest'

then

bundle install

Example

  1. Clone this repo and cd into it
  2. bundle install (Required bundler gem)
  3. cd examples
  4. Log in to the Nest Developer portal to get your OAuth credentials and to set your redirect URI.
    Set your OAuth client ID and client secret as environment variables:
export NEST_ID='Your OAuth client ID here'
export NEST_SECRET='Your OAuth client secret here'
  1. Set redirect URI to http://localhost:9292/auth/nest/callback
  2. bundle exec rackup
  3. Open http://localhost:9292 in your browser and follow the links

Usage

In Rails add the following to config/initializers/omniauth.rb

use OmniAuth::Builder do
  provider :nest, ENV['NEST_ID'], ENV['NEST_SECRET']
end

This will enable the route /auth/nest which will start the OAuth2 flow. See examples/config.ru for a fully working example.

NOTE: The Nest OAuth2 service only returns authorization tokens for the Nest API, not user identification.

Contributing

Contributions are always welcome and highly encouraged.

See CONTRIBUTING for more information on how to get started.

License

Apache 2.0 - See LICENSE for more information.

omniauth-nest's People

Contributors

beckyg6 avatar jfschmakeit avatar ryanseys avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.