I’m trying to recreate a Server Action to get Google user information from the API. My original works, but I can no longer fetch the Schema in the old one, or the new. I get the following error…
I can retrieve all the user information in the old one.
The new one, without any fields listed in the schema produced an error in the browser…
{“api1”:{“status”:401,“headers”:{“0”:“HTTP/2 401”,“pragma”:“no-cache”,“date”:“Mon, 18 May 2020 15:51:44 GMT”,“cache-control”:“no-cache, no-store, max-age=0, must-revalidate”,“expires”:“Mon, 01 Jan 1990 00:00:00 GMT”,“vary”:[“Origin”,“X-Origin”,“Referer”],“content-type”:“application/json; charset=UTF-8”,“content-encoding”:“gzip”,“server”:“ESF”,“content-length”:“228”,“x-xss-protection”:“0”,“x-frame-options”:“SAMEORIGIN”,“x-content-type-options”:“nosniff”,“alt-svc”:“h3-27=”:443"; ma=2592000,h3-25=":443"; ma=2592000,h3-T050=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v=“46,43"”},“data”:{“error”:{“code”:401,“message”:“Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",“status”:"UNAUTHENTICATED”}}}}
Whereas when I added just id and name to the schema, the action in the browser returned full information.
Obviously, I can get around this issue by just adding a field or two manually in the schema, but there appears to be something going awry.
Thanks,
Heather