class Google::SingleSignOnService < ApplicationService
  def sign_in(credential, aud)
    key_source = Google::Auth::IDTokens::JwkHttpKeySource.new(
      'https://www.googleapis.com/oauth2/v3/certs'
    )
    Google::Auth::IDTokens::Verifier.new(key_source: key_source).verify(credential, aud: aud)
  end
end
