This app is mainly used to show logic how to implement OAuth 2 in Ruby on Rails.
-
Ruby version:
The sample is tested on Ruby 2.4.2 -
System dependencies:
The rails version is 5.1.4 -
Configuration and run
- Install Ruby, Bundler, and gems:
❯ rbenv install ❯ gem install bundler -v 1.15.4 ❯ bundle install - Set up and run ngrok:
- Install:
❯ brew install --cask ngrok - Sign up for an account: https://dashboard.ngrok.com/signup
- Copy your Authtoken: https://dashboard.ngrok.com/get-started/your-authtoken
- Add your Authtoken:
❯ ngrok config add-authtoken <your_authtoken> - Run:
❯ ngrok http 3000
- Install:
- Update your OAuth 2 configuration value at config/config.yml file.
OAuth2: client_id: <your_intuit_app_client_id> client_secret: <your_intuit_app_client_secret>Settings: host_uri: https://<your_ngrok_dev_domain>/ redirect_uri: https://<your_ngrok_dev_domain>/token/new - Update your Redirect URIs in your app.
- Put the whole directory to your server, and run "rails server"
- open a browser and go to the rail server host.
- Install Ruby, Bundler, and gems: