Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

OmniAuth strategy for authenticating with Fishbrain

License

Notifications You must be signed in to change notification settings

fishbrain/omniauth-fishbrain

Repository files navigation

OmniAuth Fishbrain

This gem provides two OmniAuth strategies for Fishbrain.

  1. The fishbrain strategy is a standard OmniAuth OAuth2 strategy.
  2. The fishbrain_id strategy is intended for sharing identities between services.

Installation

gem 'omniauth-fishbrain'

Usage

In production environments:

use OmniAuth::Builder do
  provider :fishbrain, ENV['FISHBRAIN_CLIENT_ID'], ENV['FISHBRAIN_CLIENT_SECRET']
  provider :fishbrain_id
end

In development/test/staging environments:

use OmniAuth::Builder do
  provider :fishbrain, ENV['FISHBRAIN_CLIENT_ID'], ENV['FISHBRAIN_CLIENT_SECRET'],
                       user_pool_id: 'eu-west-1_9AdkO5S3c',
                       client_options: {
                         site: 'https://accounts.staging.fishbrain.com',
                       }
  provider :fishbrain_id, user_pool_id: 'eu-west-1_9AdkO5S3c'
end

path_prefix is supported too:

use OmniAuth::Builder do
  ...

  configure { |c| c.path_prefix = '/client/auth' }
end

See /examples for full example using Sinatra.

License

MIT

About

OmniAuth strategy for authenticating with Fishbrain

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages