Cannot support custom domain of Cognito hosted UI with Amplify

My app redirected to default URL of Cognito hosted UI when I specified custom domain in Cognito, deactivated default URL of Cognito hosted UI and call Auth.federatedSignIn() in my react app with Amplify.

Image for post
Image for post
Redirected to the default URL of the Cognito hosted UI

The bare minimum code to reproduce is below:

import awsconfig from "./aws-exports";Amplify.configure(awsconfig);Auth.federatedSignIn();

Which is a known issue

Apparently, this is a known issue that Amplify does not support custom domain for Cognito hosted UI yet.

Amplify seems to directly takeconfig.oauth.domain

Faced an issue to support multiple redirect URLs for Auth with Amplify

I faced the below issue when I specified multiple redirect URLs and used .federatedSignInwith Amplify module in React app.

Image for post
Image for post
Redirect URL error

The bare minimum code base to reproduce is here:

import awsconfig from "./aws-exports";Amplify.configure(awsconfig);Auth.federatedSignIn();

Which is known issue

This is known issue and basically you need to specify a single URL to your awsconfig before calling Amplify.configure as it’s recommended in the thread.

Some comments in the issue says that you need to copy the Object of the awsconfig, but property of Object in JavaScript is reference as long as you do not do deep copy so that I directly overwrote the props and it worked. …

GraphQL server usage in Japan

As same as GraphQL community has been growing, The number of searches in Japan has been also increasing. I started using it a couple years ago and immediately felt a free from manual syncing work between backend APIs and frontend calls. But turned out not many web developers surrounding me in Japan use it and that led me to research how many developers actually used it.

Image for post
Image for post

Quick survey

I asked my follower “GraphQL server usage” by a quick survey in Japanese for 24h and received 232 inputs.

Visualizing in the below:

Pie chart of GraphQL usage
Pie chart of GraphQL usage
The result is out of 232.

Quick facts:

  • The majority, 50.9%, aren’t using GraphQL yet
  • The second majority, 40%, use stand-alone solutions such as Apollo server and Hasura, and managed services are not used that much…


Daijiro Wachi

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store