No commit activity in last 3 years
No release in over 3 years
DrChrono OAuth2 strategy for OmniAuth.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.16, < 3.0
~> 12.3
~> 3.6
~> 0.16

Runtime

 Project Readme

OmniAuth DrChrono OAuth2 Strategy

Build Status Gem Version

A DrChrono OAuth2 strategy for OmniAuth.

For more details, read the DrChrono documentation: https://www.drchrono.com/api/

I found out after I pushed version 1 of this gem that another omniauth strategy already exists for DrChrono https://github.com/johnnadeau/omniauth-drchrono. I renamed this project to omniauth-drchrono-oauth2 to avoid confusion.

Installation

Add this line to your application's Gemfile:

gem 'omniauth-drchrono-oauth2'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omniauth-drchrono-oauth2

Usage

Register your application with DrChrono to receive an API key: https://www.drchrono.com/api/

This is an example that you might put into a Rails initializer at config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :drchrono, ENV['DRCHRONO_CLIENT_ID'], ENV['DRCHRONO_CLIENT_SECRET'], :scope => 'patients:read settings:read user:read'
end

You can now access the OmniAuth DrChrono OAuth2 URL: /auth/drchrono.

Granting Member Permissions to Your Application

With the DrChrono API, you have the ability to specify which permissions you want users to grant your application. For more details, read the DrChrono documentation: https://www.drchrono.com/api/

You can configure the scope option:

provider :drchrono, ENV['DRCHRONO_CLIENT_ID'], ENV['DRCHRONO_CLIENT_SECRET'], :scope => 'settings:read user:read'

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request