Skip to content

Instantly share code, notes, and snippets.

@NicholusMuwonge
Created October 24, 2020 14:58
Show Gist options
  • Select an option

  • Save NicholusMuwonge/745950bccae7016d7a6c75cc7f506f18 to your computer and use it in GitHub Desktop.

Select an option

Save NicholusMuwonge/745950bccae7016d7a6c75cc7f506f18 to your computer and use it in GitHub Desktop.

Revisions

  1. NicholusMuwonge created this gist Oct 24, 2020.
    13 changes: 13 additions & 0 deletions devise.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    # Please find this find via config/initializers/devise.rb
    # Add these to this file in case you're using these providers

    config.omniauth :google_oauth2,
    Rails.application.credentials[:google_app_id],
    Rails.application.credentials[:google_app_secret],
    { scope: 'userinfo.email, userinfo.profile', skip_jwt: true }
    config.omniauth :facebook,
    Rails.application.credentials[:facebook_app_id],
    Rails.application.credentials[:facebook_app_secret],
    scope: 'public_profile,email'

    # We save this data in credentials, read more about rails credentials to understand how they work.