Example Sinatra application showing usage of the Automatic OAuth2 Strategy
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public/images
views
.env.sample
.gitignore
.ruby-gemset.sample
.ruby-version.sample
Gemfile
Gemfile.lock
LICENSE.md
README.md
application.rb
config.ru

README.md

Automatic OmniAuth Strategy Example

This is a simple Sinatra application to show the usage of the omniauth-automatic strategy.

Demo

You can see a demo version of this app at: http://automatic-omniauth-example.herokuapp.com/

Usage

In order to use this, you first need to sign up for API access with Automatic and then register an application.

Once you have registered an application, you need to copy over the .env.sample file and fill in your details for the CLIENT_ID, and CLIENT_SECRET. You can retrieve this information.

If you are using a ruby version manager, you can copy over the .ruby-version.sample and .ruby-gemset.sample files.

Next you want to install your dependencies:

bundle install

Once that is complete you can start the application with:

bundle exec rackup config.ru

Now you can open your browser and visit http://localhost:9292.

Deploy to Heroku

If you have the heroku toolbelt installed, you can create, configure, and deploy this app to Heroku. To create an app:

heroku create

If you already created an app, add it as a git remote:

git remote add heroku {your-heroku-git-url}

Configure the Heroku application environment variables:

heroku config:set CLIENT_ID='your-client-id'
heroku config:set CLIENT_SECRET='your-client-secret'

Deploy your application to Heroku:

git push heroku master

License

This project is licensed under the terms of the Apache 2.0 license.