Code Monkey home page Code Monkey logo

omniauth-zoom's Introduction

OmniAuth::Zoom

Test codecov Gem Version license

This gem contains the zoom.us strategy for OmniAuth.

Before You Begin

You should have already installed OmniAuth into your app; if not, read the OmniAuth README to get started.

Now sign into the zoom App Marketplace and create an application. Take note of your API keys.

Using This Strategy

First start by adding this gem to your Gemfile:

gem 'omniauth-zoom'

If you need to use the latest HEAD version, you can do so with:

gem 'omniauth-zoom', :github => 'koshilife/omniauth-zoom'

Next, tell OmniAuth about this provider. For a Rails app, your config/initializers/omniauth.rb file should look like this:

Rails.application.config.middleware.use OmniAuth::Builder do
  zoom_scopes = %i[user_profile meeting:write]
  provider :zoom, zoom_client_id, zoom_client_secret, :scope => zoom_scopes.join(',')
end

Replace "API_KEY" and "API_SECRET" with the appropriate values you obtained earlier.

Auth Hash Example

The auth hash request.env['omniauth.auth'] would look like this:

{
  "provider": "zoom",
  "uid": "KdYKjnimT4KPd8FFgQt9FQ",
  "info": {},
  "credentials": {
    "token": "ACCESS_TOKEN",
    "refresh_token": "REFRESH_TOKEN",
    "expires_at": 1594035991,
    "expires": true
  },
  "extra": {
    "raw_info": {
      "id": "KdYKjnimT4KPd8FFgQt9FQ",
      "first_name": "Jane",
      "last_name": "Dev",
      "email": "[email protected]",
      "type": 2,
      "role_name": "Owner",
      "pmi": 1234567890,
      "use_pmi": false,
      "vanity_url": "https://janedevinc.zoom.us/my/janedev",
      "personal_meeting_url": "https://janedevinc.zoom.us/j/1234567890",
      "timezone": "America/Denver",
      "verified": 1,
      "dept": "",
      "created_at": "2019-04-05T15:24:32Z",
      "last_login_time": "2019-12-16T18:02:48Z",
      "last_client_version": "4.6.12611.1124(mac)",
      "pic_url": "https://janedev.zoom.us/p/KdYKjnimFR5Td8KKdQt9FQ/19f6430f-ca72-4154-8998-ede6be4542c7-837",
      "host_key": "533895",
      "jid": "[email protected]",
      "group_ids": [],
      "im_group_ids": ["3NXCD9VFTCOUH8LD-QciGw"],
      "account_id": "gVcjZnYYRLDbb_MfgHuaxg",
      "language": "en-US",
      "phone_country": "US",
      "phone_number": "+1 1234567891",
      "status": "active"
    }
  }
}

Contributing

Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the omniauth-zoom project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

omniauth-zoom's People

Contributors

koshilife avatar kwent avatar matteeyah 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.