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

Development

Runtime

 Project Readme

OmniAuth TeamSnap

Gem Version License

This is the official OmniAuth strategy for authenticating to TeamSnap. To use it, you'll need to sign up for an OAuth2 Application Id and Secret on Cogsworth.

Basic Usage

use OmniAuth::Builder do
  provider :teamsnap, ENV['TEAMSNAP_KEY'], ENV['TEAMSNAP_SECRET']
end

Scopes

TeamSnap API v3 lets you set scopes to provide granular access to different types of data:

use OmniAuth::Builder do
  provider :teamsnap, ENV['TEAMSNAP_KEY'], ENV['TEAMSNAP_SECRET'], scope: "read write"
end

Authentication Hash

An example auth hash available in request.env['omniauth.auth']:

{
  :provider => "teamsnap",
  :uid => "123456",
  :info => {
    :email => "player@example.com",
    :first_name => "John",
    :last_name => "Player",
  },
  :credentials => {
    :token => "a1b2c3d4...", # The OAuth 2.0 access token
  },
  :extra = {}
}

Testing

docker build . -t omniauth-teamsnap:test -f Test.dockerfile
docker run -t omniauth-teamsnap:test
docker image rm omniauth-teamsnap:test --force