0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Amazon Cognito マネージドログインの日本語化(ALB連携なし)

Posted at

はじめに

マネージドログインの日本語化についてはALBと連携して日本語化している記事が多いですが、ALBを使用せず日本語化する方法です。シンプルな方法ですが、記事にしました。

やってみる

Quick Setupガイドに以下のようなソースがありますが、それに言語の設定を追加するだけです。

index.js
import { AuthProvider } from 'react-oidc-context';

const cognitoAuthConfig = {
  authority: "",
  client_id: "",
  redirect_uri: "",
  response_type: "",
  scope: "",
  extraQueryParams: {
    ui_locales: "ja" // 日本語を設定
  }
};


const root = ReactDOM.createRoot(document.getElementById("root"));

root.render(
  <React.StrictMode>
    <AuthProvider {...cognitoAuthConfig}>
      <App />
    </AuthProvider>
  </React.StrictMode>
);

おわりに

ググってもわかりませんでしたが、Microsoft Copilotで聞いたら一発でわかりました。とても便利です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?