https://github.com/deanpcmad/omniauth-tiltify
OmniAuth strategy for Tiltify
https://github.com/deanpcmad/omniauth-tiltify
Last synced: about 2 months ago
JSON representation
OmniAuth strategy for Tiltify
- Host: GitHub
- URL: https://github.com/deanpcmad/omniauth-tiltify
- Owner: deanpcmad
- Created: 2021-10-24T19:10:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-12T15:58:00.000Z (about 1 year ago)
- Last Synced: 2025-02-03T14:37:01.301Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OmniAuth Tiltify
An OmniAuth strategy for Tiltify
## Installation
Add the OmniAuth Tiltify and OmniAuth rails_csrf_protection gems to your Gemfile
```ruby
gem 'omniauth-tiltify'
gem 'omniauth-rails_csrf_protection'
```## Usage
Create an Application by going to `https://dashboard.tiltify.com/MYUSERNAME/my-account/connected-accounts/applications` (and replacing `MYUSERNAME` with your own username, of course) and hitting the "create application" button.
Here's an example for adding the middleware to a Rails app in `config/initializers/omniauth.rb`:
```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
provider :tiltify, ENV["TILTIFY_APP"], ENV["TILTIFY_SECRET"]
end
```## Auth Hash
Here's an example *Auth Hash* available in `request.env['omniauth.auth']`:
```ruby
{
provider: "tiltify",
uid: 12345,
info: {
username: "testuser",
url: "https://tiltify.com/@testuser",
first_name: "Test",
last_name: "User",
email: "[email protected]",
avatar: "https://assets.tiltify.com/assets/default-avatar.png",
name: "Test User"
},
credentials: {
token: "abc123", # OAuth 2.0 access_token, which you may wish to store
expires: false # this will always be false
}
}
```