This gem provides two OmniAuth strategies for Fishbrain.
- The
fishbrain
strategy is a standard OmniAuth OAuth2 strategy. - The
fishbrain_id
strategy is intended for sharing identities between services.
gem 'omniauth-fishbrain'
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.