Analytics-o-matic, a sample app for demoing the OAuth functionality in GoCardless Pro
Ruby HTML CSS

README.md

GoCardless OAuth Demo App

A simple demo of using the GoCardless Pro OAuth API to connect one's GoCardless account to a third-party application.

A public instance of this app for use as a demo runs on Heroku at https://gocardless-oauth-demo.herokuapp.com.

Running Locally

  git clone https://github.com/gocardless/oauth-demo.git
  cd oauth-demo
  bundle
  cp .env.example .env
  $EDITOR .env
  # Update the .env file wih your authentication details (see below for help)
  bundle exec rackup

Then open http://localhost:9292/

Configuration

  • GOCARDLESS_CLIENT_ID: The client_id of your GoCardless app
  • GOCARDLESS_CLIENT_SECRET: The client_secret of your GoCardless app
  • GOCARDLESS_CONNECT_URL: The URL at which the GoCardless OAuth flow is available (https://connect.gocardless.com or https://connect-sandbox.gocardless.com)
  • GOCARDLESS_CONNECT_AUTHORIZE_PATH: The path to the authorize endpoint (/oauth/authorize)
  • GOCARDLESS_CONNECT_ACCESS_TOKEN_PATH The path to the authorize endpoint (/oauth/access_token)
  • GOCARDLESS_API_URL: The URL at which the GoCardless Pro API is available (https://api.gocardless.com or https://api-sandbox.gocardless.com)
  • SESSION_SECRET: A random string for securing session data
  • REDIRECT_URI: The redirect URI of your GoCardless app. (http://localhost:9292/analytics if running locally with bundle exec rackup)