[InterMine Dev] dev Digest, Vol 135, Issue 4

Kalpana Karra kkarra at stanford.edu
Fri Oct 23 20:11:22 BST 2020


It seems to be working in flymine (4.2.0), maybe we have to change some config?

> On Oct 23, 2020, at 4:00 AM, dev-request at lists.intermine.org wrote:
> 
> Send dev mailing list submissions to
> 	dev at lists.intermine.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.intermine.org/mailman/listinfo/dev
> or, via email, send a message with subject or body 'help' to
> 	dev-request at lists.intermine.org
> 
> You can reach the person managing the list at
> 	dev-owner at lists.intermine.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dev digest..."
> 
> 
> Today's Topics:
> 
>   1. Problems with Google OAuth2 (Sam Hokin)
>   2. Re: Problems with Google OAuth2 (Sam Hokin)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 22 Oct 2020 13:14:37 -0600
> From: Sam Hokin <shokin at ncgr.org>
> To: InterMine Devs <dev at lists.intermine.org>
> Subject: [InterMine Dev] Problems with Google OAuth2
> Message-ID: <9050bde6-0f10-ef3b-cd12-2fbdd44e5ba6 at ncgr.org>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> I've configured Google OAuth2 for the LIS mines (OAuth consent screen) and specifically BeanMine (client_id, secret and redirect 
> URI). It seems to work OK up to actually getting the auth back to the mine. If I use the default API URI, which is coded in 
> intermine/webapp/src/main/webapp/WEB-INF/global.web.properties:
> 
> oauth2.GOOGLE.identity-resource = https://www.googleapis.com/plus/v1/people/me/openIdConnect
> 
> Google returns
> 
> message	"Legacy People API has not been used in project 385508380982 before or it is disabled. Enable it by visiting 
> https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=385508380982 then retry. If you enabled 
> this API recently, wait a few minutes for the action to propagate to our systems and retry."
> status	"PERMISSION_DENIED"
> 
> I've enabled the now-called People API for my Google project.
> 
> That looks suspicious, since Google deprecated Google+ a while ago. So then I look up the Google doc
> 
> https://developers.google.com/identity/protocols/oauth2/web-server
> 
> and it appears I should use:
> 
> oauth2.GOOGLE.identity-resource = https://accounts.google.com/o/oauth2/v2/auth
> 
> but then Google appears to return something that isn't JSON:
> 
> Error granting permission: A JSONObject text must begin with '{' at 1 [character 2 line 1]
> 
> Any suggestions? Clearly this scheme is broken in 4.2.0 but I wonder if anyone has gotten it to work. If this is something that 
> needs to be updated in core IM, I can take it on, but I'd like to get feedback first. Thanks!
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Thu, 22 Oct 2020 13:24:44 -0600
> From: Sam Hokin <shokin at ncgr.org>
> To: InterMine Devs <dev at lists.intermine.org>
> Subject: Re: [InterMine Dev] Problems with Google OAuth2
> Message-ID: <27ff2bae-4d71-97d0-e41d-be6200fcea0c at ncgr.org>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> I'll add that the Google Legacy People API mentioned in the error response seems to have vanished, i.e. you cannot reach the given 
> developer panel page to turn it on. This may explain why some previously configured IM OAuth setups still work, but I cannot get the 
> old API URI to work with a new setup. A post on a Stack Overflow thread says to use the new People API instead, which I have enabled 
> for the LIS mine project and which returns the JSON error.
> 
> On 10/22/20 1:14 PM, Sam Hokin wrote:
>> I've configured Google OAuth2 for the LIS mines (OAuth consent screen) and specifically BeanMine (client_id, secret and redirect 
>> URI). It seems to work OK up to actually getting the auth back to the mine. If I use the default API URI, which is coded in 
>> intermine/webapp/src/main/webapp/WEB-INF/global.web.properties:
>> 
>> oauth2.GOOGLE.identity-resource = https://www.googleapis.com/plus/v1/people/me/openIdConnect
>> 
>> Google returns
>> 
>> message    "Legacy People API has not been used in project 385508380982 before or it is disabled. Enable it by visiting 
>> https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=385508380982 then retry. If you enabled 
>> this API recently, wait a few minutes for the action to propagate to our systems and retry."
>> status    "PERMISSION_DENIED"
> 
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> dev mailing list
> dev at lists.intermine.org
> https://lists.intermine.org/mailman/listinfo/dev
> 
> 
> ------------------------------
> 
> End of dev Digest, Vol 135, Issue 4
> ***********************************



More information about the dev mailing list