Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Google Scopes #1

@akodkod

Description

@akodkod

Hi,

I tried to use this module for Google SSO.
I need to set custom scopes.

I set all parameters, by using this guide https://developers.google.com/accounts/docs/OpenID#oauth

I set openid.ext2.scope, but always I have this page:
Sorry for russian language. On the page states, that the request is only basic information.
image

That's my code for request:

def apps
    openid_parameters = {
        #required: [ :nickname, :email ],

        'openid.ns' => 'http://specs.openid.net/auth/2.0',
        'openid.claimed_id' => 'http://specs.openid.net/auth/2.0/identifier_select',
        'openid.realm' => 'http://localhost:3000/',

        'openid.ns.ui' => 'http://specs.openid.net/extensions/ui/1.0',
        'openid.ui.mode' => 'popup',
        'openid.ui.icon' => 'true',

        'openid.ns.ax' => 'http://openid.net/srv/ax/1.0',
        'openid.ax.mode' => 'fetch_request',
        'openid.ax.required' => 'country+email+firstname+lastname',

        'openid.ns.ext2' => 'http://specs.openid.net/extensions/oauth/1.0',
        'openid.ext2.consumer' => 'localhost:3000',
        'openid.ext2.scope' => 'https://mail.google.com/'
    }

    authenticate_with_open_id('https://www.google.com/accounts/o8/id', openid_parameters) do |result, identity_url, registration|
      puts 'result'
      puts result.inspect

      case result.status
        when :missing
          flash[:error] = 'Sorry, the OpenID server couldn\'t be found'
        when :invalid
          flash[:error] = 'Sorry, but this does not appear to be a valid OpenID'
        when :canceled
          flash[:error] = 'OpenID verification was canceled'
        when :failed
          flash[:error] = 'Sorry, the OpenID verification failed'
        when :successful
          puts 'identy'
          puts identity_url.inspect
          puts 'registration'
          puts registration.inspect
      end
    end
  end

Please tell me, what I'm doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions