StandardId Google Provider
This gem extracts the Google OAuth provider from the core standard_id engine so installations can opt into Google login independently of the base gem.
Installation
Add the gem next to standard_id:
# Gemfile
gem "standard_id"
gem "standard_id-google"
Then run:
bundle install
The gem automatically registers itself with StandardId when it is required.
Configuration
Configure your Google credentials inside the StandardId configuration block:
StandardId.configure do |config|
config..google_client_id = ENV.fetch("GOOGLE_OAUTH_CLIENT_ID", nil)
config..google_client_secret = ENV.fetch("GOOGLE_OAUTH_CLIENT_SECRET", nil)
end
With those values in place, StandardId routes such as /auth/callback/google continue to function using this provider gem.
Testing
Run the provider test suite with:
bundle exec rspec
Development
bin/setupbundle exec rspec
To release a new version:
- Update the version in
lib/standard_id/google/version.rb. - Run
bundle exec rake releaseto tag, push, and publish to RubyGems.
License
The gem is available as open source under the terms of the MIT License.