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

Development

~> 2.0

Runtime

~> 1.8.10
~> 2.0
 Project Readme

OmniAuth::Mastodon

Gem Version

Authentication strategy for federated Mastodon instances. This is just slightly more complicated than a traditional OAuth2 flow: We do not know the URL of the OAuth end-points in advance, nor can we be sure that we already have client credentials for that Mastodon instance.

Installation

gem 'omniauth-mastodon-st'

Configuration

Example:

MASTODON_OMNIUATH_SETUP = lambda do |env|
  env["omniauth.strategy"].options[:domain] = Settings::Authentication.mastodon_domain
  env["omniauth.strategy"].options[:client_id] = Settings::Authentication.mastodon_client
  env["omniauth.strategy"].options[:client_secret] = Settings::Authentication.mastodon_secret
  env["omniauth.strategy"].options[:scope] = "read"
end
Devise.setup do |config|
  config.omniauth :mastodon, setup: MASTODON_OMNIUATH_SETUP
end