> rails new redbooth-punch-card
> cd redbooth-punch-card
> git init .
> git add -A .
> git ci -m 'initial commit'
> git remote add origin git@github.com:andresbravog/redbooth-punch-card.git
> git push -u origin master
> rvm rvmrc create ruby-2.1.4@redbooth-punch-card
> rvm rvmrc load .rvmrc
> vim .envrc
# .envrc
export SESSION_KEY=alksdfjaklsdfjalksjdfaue12312jadskfadfas231
> direnv allow .
> vim config/initializers/session_store.rb
# config/initializers/session_store.rb
Rails.application.config.session_store :cookie_store, key: ENV['SESSION_KEY'] || '_redbooth-punch-card_session'
> vim Gemfile
# Authentication
gem 'devise'
> bundle
> be rails generate devise:install
> be rails generate devise User
> be rake db:migrate
> vim Gemfile
# Gemfile
gem 'omniauth-redbooth'
> bundle
> bundle exec rails g migration AddOmniauthColumnsToUsers provider uid
> bundle exec rake db:migrate
Follow the instructions here to create a Redbooth oauth2 App.
Be sure to Add the correct list of redirect-uri, in this case your callback uri will look like http://yourappdoma.in/users/auth/redboooth/callback
.
https://redbooth.com/api/getting-started/
Follow the intructions here to complete a signup with Redbooth process with devise
https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview