Sha256: 1b24a08086760767625b47dda29811171b504b2fefae516e9ce14a2f442afea6

Contents?: true

Size: 1.3 KB

Versions: 4

Compression:

Stored size: 1.3 KB

Contents

# OmniAuth Coinbase

OmniAuth 2 strategy for [Coinbase](https://coinbase.com/)

For more details, read the [Coinbase API Reference](https://coinbase.com/docs/api/overview#oauth2)

# Installation

Add to your Gemfile:

```ruby
gem "omniauth-coinbase"
```

Then bundle install.

# Usage

Here's an example, adding the middleware to a Rails app in config/initializers/omniauth.rb:

```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
  provider :coinbase, ENV["COINBASE_KEY"], ENV["COINBASE_SECRET"]
end
```

You can now access the OmniAuth Coinbase OAuth2 URL: /auth/coinbase

# Configuration

You can configure permissions/scope, which you pass in to the `provider` method after your `COINBASE_KEY` and `COINBASE_SECRET`:

```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
  provider :coinbase, ENV["COINBASE_KEY"], ENV["COINBASE_SECRET"], scope: 'user send addresses'
end
```

The format is a space separated list of strings from Coinbase's [list of OAuth Permissions](https://coinbase.com/docs/api/authentication#permissions). If you don't include any `scope` it will default to `all`.

NOTE: While developing your application, if you change the scope in the initializer you will need to restart your app server. Remember that at minimum you MUST include either the 'all' or 'user' scopes.

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
omniauth-coinbase-1.0.4 README.md
omniauth-coinbase-1.0.2 README.md
omniauth-coinbase-1.0.1 README.md
omniauth-coinbase-1.0.0 README.md