@@ -98,7 +98,7 @@ <h1 class="title">Module <code>supertokens_python.recipe.dashboard.api.userdetai
98
98
raise Exception("Should not come here")
99
99
100
100
async def reset_password(
101
- recipe: Any, # FIXME
101
+ form_fields: List[NormalisedFormField],
102
102
create_reset_password_token: Callable[
103
103
[str],
104
104
Awaitable[
@@ -117,7 +117,6 @@ <h1 class="title">Module <code>supertokens_python.recipe.dashboard.api.userdetai
117
117
) -> Union[
118
118
UserPasswordPutAPIResponse, UserPasswordPutAPIInvalidPasswordErrorResponse
119
119
]:
120
- form_fields: List[NormalisedFormField] = recipe.get_instance().config.sign_up_feature.form_fields # type: ignore # FIXME?
121
120
password_form_field = [
122
121
field for field in form_fields if field.id == FORM_FIELD_PASSWORD_ID
123
122
][0]
@@ -150,14 +149,14 @@ <h1 class="title">Module <code>supertokens_python.recipe.dashboard.api.userdetai
150
149
151
150
if recipe_to_use == "emailpassword":
152
151
return await reset_password(
153
- EmailPasswordRecipe,
152
+ EmailPasswordRecipe.get_instance().config.sign_up_feature.form_fields ,
154
153
ep_create_reset_password_token,
155
154
ep_reset_password_using_token,
156
155
)
157
156
158
157
if recipe_to_use == "thirdpartyemailpassword":
159
158
return await reset_password(
160
- ThirdPartyEmailPasswordRecipe,
159
+ ThirdPartyEmailPasswordRecipe.get_instance().email_password_recipe.config.sign_up_feature.form_fields ,
161
160
tpep_create_reset_password_token,
162
161
tpep_reset_password_using_token,
163
162
)</ code > </ pre >
@@ -213,7 +212,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
213
212
raise Exception("Should not come here")
214
213
215
214
async def reset_password(
216
- recipe: Any, # FIXME
215
+ form_fields: List[NormalisedFormField],
217
216
create_reset_password_token: Callable[
218
217
[str],
219
218
Awaitable[
@@ -232,7 +231,6 @@ <h2 class="section-title" id="header-functions">Functions</h2>
232
231
) -> Union[
233
232
UserPasswordPutAPIResponse, UserPasswordPutAPIInvalidPasswordErrorResponse
234
233
]:
235
- form_fields: List[NormalisedFormField] = recipe.get_instance().config.sign_up_feature.form_fields # type: ignore # FIXME?
236
234
password_form_field = [
237
235
field for field in form_fields if field.id == FORM_FIELD_PASSWORD_ID
238
236
][0]
@@ -265,14 +263,14 @@ <h2 class="section-title" id="header-functions">Functions</h2>
265
263
266
264
if recipe_to_use == "emailpassword":
267
265
return await reset_password(
268
- EmailPasswordRecipe,
266
+ EmailPasswordRecipe.get_instance().config.sign_up_feature.form_fields ,
269
267
ep_create_reset_password_token,
270
268
ep_reset_password_using_token,
271
269
)
272
270
273
271
if recipe_to_use == "thirdpartyemailpassword":
274
272
return await reset_password(
275
- ThirdPartyEmailPasswordRecipe,
273
+ ThirdPartyEmailPasswordRecipe.get_instance().email_password_recipe.config.sign_up_feature.form_fields ,
276
274
tpep_create_reset_password_token,
277
275
tpep_reset_password_using_token,
278
276
)</ code > </ pre >
0 commit comments