Skip to content

PrestoDoctor/prestodoctor-oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrestoDoctor OAuth Example

Feel free to use these button images:

(normal button)

(@2x retina button)

This is a sample application showing how to integrate with PrestoDoctor OAuth.

This example uses a custom omniauth strategy, but you are free to use whichever OAuth2 implementation you wish.

The relevant files are:

  • app/models/user.rb
  • config/initializers/devise.rb (line 244)
  • app/controllers/users/omniauth/callbacks_controller.rb

In the callbacks controller, you see we call update_presto_credentials with our oauth_data.

Here is the format of all the information contained in oauth_data (sensitive data blurred to protect the innocent):

All dates/times are unix timestamps.