SignUp handleSubmit skipValidation parameter not exposed in TypeScript types
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- react, typescript
調査の方向性
BaseSignUpRenderProps の TypeScript 定義と、対応する BaseSignIn の render-props 型を検索します。それらの handleSubmit 宣言を、issue に記載された実行時シグネチャと比較し、両方の宣言を更新してオプションの skipValidation パラメーターを公開します。その後、関連する型チェックまたはテストを実行して、consumer が 3 番目の引数を渡せることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Description
The handleSubmit function in the v2 SignUp/SignIn embedded flow components accepts a skipValidation third parameter, but this parameter is not exposed in the TypeScript type definitions. This makes it impossible for consumers using the render props pattern to skip validation for specific actions (e.g., social login triggers that don't need form inputs).
Current Behavior
The runtime function signature supports skipValidation:
// From compiled dist/index.js (~line 11844)
const handleSubmit = async (component, data, skipValidation) => {
if (!skipValidation) {
touchAllFields();
const validation = validateForm();
if (!validation.isValid) {
return;
}
}
// ... proceed with API call
};
But the TypeScript type in BaseSignUpRenderProps only declares:
handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;
The third parameter is missing from the type, so TypeScript consumers don't know it exists and can't use it without any casting.
Expected Behavior
The type should expose the skipValidation parameter:
handleSubmit: (component: any, data?: Record<string, any>, skipValidation?: boolean) => Promise<void>;
This allows consumers to decide when validation should be skipped based on their own logic. For example, in Thunder's gate, social login trigger buttons skip validation since they don't use form inputs:
onSubmit={(action, inputs) => {
const isTrigger = action.eventType === EmbeddedFlowEventType.Trigger;
void handleSubmit(action, inputs, isTrigger);
}}
Affected Components
- v2 SignUp (
BaseSignUp) —BaseSignUpRenderProps.handleSubmittype definition - v2 SignIn (
BaseSignIn) — equivalent render props type definition
Both have the skipValidation parameter in the runtime implementation but not in the types.
Related
- Thunder issue: https://github.com/asgardeo/thunder/issues/2346
Additional Context
- SDK version:
@asgardeo/react@0.23.1 - The validation-skipping logic should remain a consumer decision, not an SDK-internal assumption — there are valid cases where trigger actions may still need form validation
- 主要言語
- TypeScript
- スター
- 18
- フォーク
- 67
- 平均マージ
- 4時間 6分
- マージ済み PR(30日)
- 13
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
asgardeo/javascript のほかの issue
-
Bug: SignInButton render prop usage in "react-tanstack-router" sample missing "onClick={signIn}" オープンType/Bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
asgardeo/javascript#572 ·
-
Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
asgardeo/javascript#571 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
asgardeo/javascript#527 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
asgardeo/javascript#522 · コメント 2 件 ·
-
Type/Bug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
asgardeo/javascript#519 ·
asgardeo/javascript の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ontola/atomic-server#1625 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
melgarafael/DeskcommCRM#1451 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
-
bug via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bot:ai-assisted component:compact-js status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
midnightntwrk/midnight-sdk#403 ·