https://github.com/rossta/omniauth-memberful
OmniAuth strategy for Memberful
https://github.com/rossta/omniauth-memberful
Last synced: 8 months ago
JSON representation
OmniAuth strategy for Memberful
- Host: GitHub
- URL: https://github.com/rossta/omniauth-memberful
- Owner: rossta
- License: mit
- Created: 2015-02-07T14:50:04.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-07T17:06:59.000Z (over 11 years ago)
- Last Synced: 2025-09-01T02:08:34.403Z (8 months ago)
- Language: Ruby
- Size: 156 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# OmniAuth::Memberful
OmniAuth strategy to authenticate users over the Memberful API in Rails (or Rack)
applications.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'omniauth-memberful'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install omniauth-memberful
## Usage
As with other OmniAuth strategies, you'll need to setup the OmniAuth middleware and
a callback to receive the OmniAuth credentials once a user has been authenticated.
You can enable `Omniauth::Memberful` by using the `OmniAuth::Builder` to insert the strategy middleware
with your Memberful credentials. Visit your Memberful Settings page to generate
a "Custom App" with a name and endpoint in your application for the OAuth callback. You'll get use
the generated identifier and secret key in your OmniAuth setup with
In Rails:
```yaml
# config/secrets.yml
development:
memberful_app_identifier: aaaaaaaaa
memberful_app_secret: bbbbbbbbbbbbbbbbbbb
memberful_site: https://yoursite.memberful.com
```
```ruby
# config/initializers/omniauth.rb
require "omniauth-memberful"
secrets = Rails.application.secrets
Rails.application.config.middleware.use OmniAuth::Builder do
provider OmniAuth::Strategies::Memberful,
secrets.memberful_app_identifier,
secrets.memberful_app_secret,
client_options: { site: secrets.memberful_site }
end
```
Check out the example app at [rossta/memberful-rails-example](github.com/rossta/memberful-rails-example) for more info.
## Contributing
1. Fork it ( https://github.com/[my-github-username]/omniauth-memberful/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request