This is a simple Ruby app using the Rails framework with added login/logout/register/restore_password logic with external API and Devise without using DB.
Added gems:
# Add compatibility with jquery
gem 'jquery-turbolinks', '~> 2.1'
# Auth
gem 'devise'
gem 'devise-i18n'
# Email validator
gem 'validates_email_format_of'
# Error pages
gem 'gaffe'
Added development gems:
gem "better_errors"
gem "binding_of_caller"
gem 'rubocop' # to check Ruby code
gem 'scss-lint' # to check SCSS code
gem 'phare' # check for coding style errors
Make sure you have Ruby, Bundler installed.
git clone -b external-api-auth [email protected]:kefiriaus/ruby-rails-sample.git ruby-rails-sample-external-api-auth
cd ruby-rails-sample-external-api-auth
bundle install
rails s
Your app should now be running on localhost:3000.
user_signed_in? # Checking user authorization
current_user # Add @current_user variable
user_signed_in?