クライアントID・シークレット生成ツール

ブラウザでOAuthクライアントIDとクライアントシークレットを生成します。接頭辞、長さ、個数を指定できます。

// about

ツールについて

ブラウザ内でランダムなクライアントIDとシークレットを生成するツールです。開発やテストに使用し、生成したシークレットは安全な保管庫に保存してください。

使い方

  1. 接頭辞、シークレットの長さ、生成数を入力します。
  2. 生成を押してクライアントIDとシークレットを確認します。
  3. 結果をコピーして安全な保管庫に保存します。削除後は復元できません。

このツールが使われる理由

  • 接頭辞を指定して複数の認証情報をすばやく作成できます。
  • 24~128文字のシークレット長を選択できます。
  • ブラウザ内で生成され、サーバーには送信されません。

よくある質問 (FAQ)

生成した認証情報は保存されますか?

いいえ。ブラウザ内で生成され、ページには保存されません。

シークレットは何文字まで作れますか?

24文字から128文字まで選択できます。

本番環境で使えますか?

開発やテスト向けです。本番ではサービスのポリシーに従い、管理された保管庫を利用してください。

ガイド · セキュリティ · 4分で読めます

強いパスワードの作り方:長さ、エントロピー、パスワードマネージャー

「記号を1つ以上含める」といったルールはおなじみですが、パスワードを本当に強くするのはランダムさと長さです。計算してみると、なぜ弱いパスワードがあるのかがはっきり分かります。

攻撃者が使う主な方法は3つです。他のサイトから流出したユーザー名とパスワードを使い回すクレデンシャルスタッフィング、よく使われるパスワードや単語を試す辞書攻撃、そしてあらゆる組み合わせを試す総当たり攻撃です。

数字6桁                       : 6 × log2(10)  ≈ 20ビット
ランダムな小文字16文字        : 16 × log2(26) ≈ 75ビット
94種からランダムに12文字      : 12 × log2(94) ≈ 79ビット
ランダムな英数字16文字        : 16 × log2(62) ≈ 95ビット
パスワードのエントロピーの計算方法、複雑さのルールより長さが効く理由、避けるべきパターン、パスワードマネージャーの使い方を解説します。
ガイドを読む →
AIで作る

このツールをAIで自作してみましょう

自分用のバージョンが必要なら、作業指示プロンプトをAIチャットに貼り付けるか、スキルファイルをAIコーディングエージェントに保存してください。私たちが開発時に整理した機能、例外、テストケースが含まれています。

プロンプトとスキルは英語で提供しています。AIツールはどの言語でもよく理解できます。

AI作業指示プロンプト

Claude、ChatGPT、GeminiなどのAIチャットにそのまま貼り付けてください。

You are an experienced full-stack web developer. Build a web tool called "クライアント認証情報ジェネレーター" that meets the requirements below.

## Goal

Build a tool that securely generates client IDs and client secrets for API integrations.

## Core features

- Client IDs with a prefix (e.g. app_)
- Secrets with selectable length and character set
- Base64URL or hex output
- Preview as .env variables
- Copy each item

## Inputs

- Prefix, secret length in bytes, output format

## Outputs

- Client ID
- Client secret
- .env formatted text

## Edge cases and handling rules

- Recommend at least 32 bytes for secrets
- Never send or store generated values on a server
- Use only URL- and header-safe characters
- Warn that values disappear on refresh

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- A 32-byte Base64URL secret is 43 characters without padding
- Consecutive values differ
- IDs start with the chosen prefix

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

スキル (SKILL.md)

Claude CodeなどのAIコーディングエージェントで .claude/skills/build-client-credential-generator/SKILL.md に保存すると、このツールを作る・直すたびに再利用できます。

---
name: build-client-credential-generator
description: Use when building or changing a クライアント認証情報ジェネレーター tool. Build a tool that securely generates client IDs and client secrets for API integrations.
---

# Build: クライアント認証情報ジェネレーター

## Goal

Build a tool that securely generates client IDs and client secrets for API integrations.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Client IDs with a prefix (e.g. app_)
- Secrets with selectable length and character set
- Base64URL or hex output
- Preview as .env variables
- Copy each item

## Inputs

- Prefix, secret length in bytes, output format

## Outputs

- Client ID
- Client secret
- .env formatted text

## Rules

- Recommend at least 32 bytes for secrets
- Never send or store generated values on a server
- Use only URL- and header-safe characters
- Warn that values disappear on refresh
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] A 32-byte Base64URL secret is 43 characters without padding
- [ ] Consecutive values differ
- [ ] IDs start with the chosen prefix

AIに任せるときのコツ

  • 最初の行に使用技術(React、Vue、素のHTMLなど)を書くと、プロジェクトに合ったコードになります。
  • コードを受け取る前に、テストケースを実行して結果を見せるよう依頼しましょう。
  • 本物のパスワード、顧客データ、APIキーは入力せず、サンプル値を使ってください。