Skip to content

s-ashwinkumar/api-oauth-example-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rails Genomelink-API Demo

This is a sample rails application to show the use of genomelink-ruby gem. It implements the oauth and fetches some reports.

Usage Instructions

Step 1 - Setup/Register your app on genomelink.io

Visit "My apps" console and set

  • Name: as you like
  • Redirect uris: http://127.0.0.1:3000/callback

Set scopes (whitelists) in "Authorization scopes" panel.

  • report:eye-color
  • report:endurance-performance
  • report:caffeine-consumption

Step 2 - Run the demo app

# Set the required ENV variables
# These details would be available in app dashboard on genomelink.io
$ export GENOMELINK_CLIENT_ID=<your_client_id>
$ export GENOMELINK_CLIENT_SECRET=<your_client_secret>
$ export GENOMELINK_CALLBACK_URL="http://127.0.0.1:3000/callback"
# In the code directory, run bundle install and start the server
$ bundle install
$ rails s

Visit http://127.0.0.1:3000

How it works

See https://genomelink.io/developers/docs/tutorial-oauth-example/

About

OAuth Example - Ruby on Rails webapp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published