This repository was archived by the owner on Sep 17, 2024. It is now read-only.
forked from rails/open_id_authentication
-
Notifications
You must be signed in to change notification settings - Fork 3
This repository was archived by the owner on Sep 17, 2024. It is now read-only.
Google Scopes #1
Copy link
Copy link
Open
Description
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.
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
Labels
No labels
