Skip to content

burtcorp/omniauth-reddit-oauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OmniAuth Reddit (Advertising API) OAuth2 Strategy

Strategy to authenticate with Reddit (Advertising API) via OAuth2 in OmniAuth

Sign up and create your Application by following the instructions at https://ads-api.reddit.com/docs/v3/

Installation

Add to your Gemfile:

gem 'omniauth-reddit-oauth2'

Then bundle install.

Usage

Here's an example for adding the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :reddit_oauth2, ENV['REDDIT_CLIENT_ID'], ENV['REDDIT_CLIENT_SECRET'], { name: 'reddit', scope: '' }
end

You can now access the OmniAuth Reddit OAuth2 URL: /auth/reddit_oauth2

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages