Google Identity Toolkit returns error 2 when signing in with aol email Id - google-identity-toolkit

I have been using Google Identity Toolkit for my GAE (Java) based app for couple years now. I have Google, Facebook and Microsoft federated logins enabled. However, when a user tries to "Sign In with Email" and uses an #aol.com account, it returns a 503 error, and Error code: Error code: 2. error message on the UI. In the console, the following errors appear:
gitkit.js:242 POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/createAuthUri?key=<key> 503 ()
lj.send # gitkit.js:242
Mj # gitkit.js:255
Lj.requestGitkitEndpoint # gitkit.js:256
Oj.createAuthUri # gitkit.js:258
N # gitkit.js:190
Vm # gitkit.js:337
(anonymous) # gitkit.js:338
(anonymous) # gitkit.js:79
(anonymous) # gitkit.js:77
Yc # gitkit.js:44
g.dispatchEvent # gitkit.js:42
g.handleEvent # gitkit.js:70
Mc.a.(anonymous function).a.(anonymous function) # gitkit.js:41
Uc # gitkit.js:39
Rc # gitkit.js:41
Pc.b # gitkit.js:37
gitkit.js:254 [ 40.291s] [identitytoolkit] createAuthUri: {"error":{"errors":[{"domain":"global","reason":"backendError","message":"Error code: 2"}],"code":503,"message":"Error code: 2"}}
Is this a bug?

It was related to AOL shutting down their OIDC service. Google Identity Toolkit team applied a fix to bypass it. The issue was resolved without any code change from my end. Thanks to #bojeil for help.

Related

How to resolve gargle error when reading a Google sheet into R?

I'm trying to read a Google sheet in RStudio and even though the authentication goes through without a hitch, I keep getting a gargle error:
✖ Request failed [503]. Retry 1 happens in 1.9 seconds ...
Error in `gargle::response_process()`:
! Client error: (400) INVALID_ARGUMENT
• Client specified an invalid argument. Check error
message and error details for more information.
• Request contains an invalid argument.
Backtrace:
1. googlesheets4::read_sheet("sheet link")
2. googlesheets4:::get_cells(...)
3. googlesheets4::gs4_get(ssid)
4. googlesheets4:::gs4_get_impl_(as_sheets_id(ss))
5. gargle::response_process(raw_resp)
Here is my initial code:
library(googlesheets4)
read_sheet("sheet link")
Is it OK to cache OAuth access credentials in the folder
~/Library/Caches/gargle between R sessions?
1: Yes
2: No
Selection: 1
The httpuv package enables a nicer Google auth experience,
in many cases.
It doesn't seem to be installed.
Would you like to install it now?
1: Yes
2: No
Selection: 1
I've explored different documentation online but can't seem to find a solution.

Flutter Firebase Google Auth doesn't work in production

I'm trying to get my Flutter Web app to work with Firebase Google Auth. Everything works locally, but on the production server (hosted on Firebase) I just get the following not helpful stack trace:
js_helper.dart:1111 Uncaught
b # js_helper.dart:1111
$0 # async_patch.dart:710
auu # schedule_microtask.dart:40
auO # schedule_microtask.dart:49
$1 # async_patch.dart:49
awf # js_helper.dart:1807
(anonymous) # js_helper.dart:1839
childList (async)
$1 # async_patch.dart:62
ail # async_patch.dart:27
a8H # zone.dart:1495
ii # zone.dart:1707
pJ # future_impl.dart:665
el # future_impl.dart:50
nS # future_impl.dart:33
hN # future_impl.dart:21
$1 # google_sign_in_web.dart:111
ar8 # js_helper.dart:836
afa # core_patch.dart:84
atA # js_patch.dart:542
(anonymous) # js_patch.dart:520
e.Zn # cb=gapi.loaded_0:231
gk # cb=gapi.loaded_0:234
bk # cb=gapi.loaded_0:234
_.Mj.Vt # cb=gapi.loaded_0:233
Kj # cb=gapi.loaded_0:226
Promise.then (async)
Fj # cb=gapi.loaded_0:226
_.Jj # cb=gapi.loaded_0:226
ck # cb=gapi.loaded_0:233
Lj # cb=gapi.loaded_0:232
(anonymous) # cb=gapi.loaded_0:227
(anonymous) # cb=gapi.loaded_0:352
$u.dispatchEvent # cb=gapi.loaded_0:262
_.Wv.Pv # cb=gapi.loaded_0:297
(anonymous) # cb=gapi.loaded_0:289
_.h.LY # cb=gapi.loaded_0:284
(anonymous) # cb=gapi.loaded_0:286
This is a brand new project with the latest Flutter / Firebase dependencies. My index html looks like this:
...
<head>
<meta name="google-signin-client_id" content="myActualId.apps.googleusercontent.com">
</head>
<body>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.6.1/firebase-auth.js"></script>
I also added the domain I'm using in the Firebase console "Sign-in method" under "Authorised Domains". What can I do to debug this issue?
It turns out that Firefox is better in terms of reporting this issue. In contrast to the Chrome console, Firefox console produced a nice error message (unfortunately I haven't copied the exact message), telling me that the client ID was not registered with Google Cloud Services. There must be a synchronization issue between Firebase Console (where the ID was registered) and Google Cloud Console (where the ID was not registered).

Get data from OpenDap server that requires authentication using R

I'm trying to get data from an OPeNDAP server using R and the ncdf4 package. However, the nasa eosdis server requires username / password. How can I pass this info using R?
Here is what I'm trying to do:
require(ncdf4)
f1 <- nc_open('https://disc2.gesdisc.eosdis.nasa.gov/opendap/TRMM_L3/TRMM_3B42.7/2018/020/3B42.20180120.15.7.HDF')
And the error message:
Error in Rsx_nc4_get_vara_double: NetCDF: Authorization failure syntax
error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or
SCAN_ERROR context: HTTP^ Basic: Access denied. Var: nlat Ndims: 1
Start: 0 Count: 400 Error in ncvar_get_inner(d$dimvarid$group_id,
d$dimvarid$id, default_missval_ncdf4(), : C function
R_nc4_get_vara_double returned error
I tried the url https://username:password#disc2.... but that did not work also.
Daniel,
The service you are accessing is using third-party redirection to authenticate users. Therefore the simple way of providing credentials in the URL doesn't work.
You need to create 2 files.
A .dodsrc file (a RC file for the netcdf-c library) with the following content
HTTP.COOKIEFILE=.cookies
HTTP.NETRC=.netrc
A .netrc file, in the location referenced in the .dodsrc, with your credentials:
machine urs.earthdata.nasa.gov
login YOURUSERNAMEHERE
password YOURPASWORDHERE
You can find more details at
https://www.unidata.ucar.edu/software/netcdf/docs/md__Users_wfisher_Desktop_v4_86_81-prep_netcdf-c_docs_auth.html
Regards
Antonio
unfortunately, even after defining the credentials and their location
ncdf4::nc_open("https://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGDE.06/2020/08/3B-DAY-E.MS.MRG.3IMERG.20200814-S000000-E235959.V06.nc4")
still returns
Error in Rsx_nc4_get_vara_double: NetCDF: Authorization failure
The same happens when using ncdump from a terminal:
$ ncdump https://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGDE.06/2020/08/3B-DAY-E.MS.MRG.3IMERG.20200814-S000000-E235959.V06.nc4
returns
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or
SCAN_ERROR context: HTTP^ Basic: Access denied. NetCDF: Authorization
failure Location: file
/build/netcdf-KQb2aQ/netcdf-4.6.0/ncdump/vardata.c; line 473

Rlinkedin API not connecting, getting timeout error

I am trying to use the linkedin API to access some data for a project. I am following the instructions provided by https://github.com/mpiccirilli/Rlinkedin . But no matter what I do I run into a time out error:
library(pacman)
p_load(rvest,ggplot2,Rlinkedin,httr,curl,devtools,dplyr,devtools)
in.auth <- inOAuth()
The console returns this message:
If you've created you're own application, be sure to copy and paste
the following into 'OAuth 2.0 Redirect URLs' in the LinkedIn
Application Details: http://localhost:1410/ When done, press any key
to continue... Use a local file ('.httr-oauth'), to cache OAuth access
credentials between R sessions?
1: Yes 2: No
I click 1 or 2 and I get the same error:
Adding .httr-oauth to .gitignore Error in curl::curl_fetch_memory(url,
handle = handle) : Timeout was reached: Connection timed out after
10000 milliseconds
No matter what I try I get the same error, any help would be very very very appreciated.

OAuth with httr package and twitter API v1.1

I'm trying to follow the demo in the httr package to authorize myself with twitter. However, using the code in the demo only produces this error:
Response [https://api.twitter.com/1/statuses/home_timeline.json]
Status: 410
Content-type: application/json; charset=utf-8
{"errors": [{"message": "The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.", "code": 68}]}
What in the code would need to be changed to allow it to work with Twitter API v1.1 (note that the key and token below are from the demo, but I use my own to produce the error above)?
I've also tried using the Roauth package, but it gives me the same error as here: strsplit error when attempting to access Fitbit with ROAuth
myapp <- oauth_app("twitter", key = "TYrWFPkFAkn4G5BbkWINYw")
sig <- sign_oauth1.0(myapp,
token = "69133574-FZ9GJlJ57V0SVdNAzo71mQZSUrpUbiJZBVpDmbYkd",
token_secret = Sys.getenv("TWITTER_ACCESS_SECRET"))
GET("https://api.twitter.com/1/statuses/home_timeline.json", sig)
Try ... GET("https://api.twitter.com/1.1/statuses/home_timeline.json", sig) instead (substitute 1 by 1.1).

Resources