aws-amplify / aws-amplify/amplify-hosting

Next JS / Node Google API - client network socket disconnected before secure TLS connection was established

Open
#2,570 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

I am truing to connect to a googleApi to push some data to a google sheet. This all works fine locally. Is this a limitation of amplify. i.e. you can't call an api. I am calling it from pages/api as the google credential cannot be exposed client side.

FetchError: request to https://www.googleapis.com/oauth2/v4/token failed, reason: Client network socket disconnected before secure TLS connection was established

Many thanks

Contributor guide

Open the contributing guide

Research direction

Start from the pages/api entry point and reproduce the request to https://www.googleapis.com/oauth2/v4/token in the Amplify deployment, comparing it with the local result. Determine whether Amplify prevents this server-side API call; done means the limitation or required configuration is established and documented, or the request succeeds without exposing credentials client-side.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, nextjs, node.js
Domain
api, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.