问题描述
我使用 cognito 用户池进行用户管理,并使用 forgotPassword 流程向用户发送确认代码。出于 UI 目的,我需要验证在调用 API ForgotPassword 时发送的代码,但尚未发送新密码。我需要 ForgotPassword 和 ConfirmForgotPassword 之间的中间步骤。
type FilterUndefined<T extends any[]> = T extends [] ? [] :
T extends [infer H,...infer R] ?
H extends undefined ? FilterUndefined<R> : [H,...FilterUndefined<R>] : T;
type SpliceTuple<T extends any[],I extends number> = FilterUndefined<UndefIndex<T,I>>;
type a = SpliceTuple<[1,2,3],0>; //[2,3]
type b = SpliceTuple<[1,1>; //[1,3]
type c = SpliceTuple<[1,2>; //[1,2]
type d = SpliceTuple<[1,3>; //[1,3]
此功能是通过发送的代码重置密码(如果代码无效,我会在这里收到通知)
Auth.forgotPassword(username)
是否可以仅验证使用现有 API 发送的代码?
这是一个包含信息的链接: https://docs.amplify.aws/lib/auth/manageusers/q/platform/js#forgot-password
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)