You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be a bug in the angular-token library regarding the handling of the loginField parameter during the password reset request. In the current implementation:
The loginField option is used to dynamically set the key for the login credential in the request body. While this approach works for normal login requests, it causes issues during password reset requests.
Problem:
Devise, which angular-token typically integrates with, expects the email to be provided in the email parameter during password reset. However, if this.options.loginField is set to a value other than "email" (e.g., "username"), the password reset request will fail because Devise does not recognize the custom parameter name.
Proposed Solution:
The library should override the loginField option and enforce the use of "email" as the key in the password reset request body, regardless of the value set in this.options.loginField. This would align the implementation with Devise's expectations and prevent potential issues.
The text was updated successfully, but these errors were encountered:
Description:
There appears to be a bug in the
angular-token
library regarding the handling of theloginField
parameter during the password reset request. In the current implementation:angular-token/projects/angular-token/src/lib/angular-token.service.ts
Lines 415 to 418 in 62ecc83
The loginField option is used to dynamically set the key for the login credential in the request body. While this approach works for normal login requests, it causes issues during password reset requests.
Problem:
Devise, which angular-token typically integrates with, expects the email to be provided in the email parameter during password reset. However, if this.options.loginField is set to a value other than "email" (e.g., "username"), the password reset request will fail because Devise does not recognize the custom parameter name.
Proposed Solution:
The library should override the loginField option and enforce the use of "email" as the key in the password reset request body, regardless of the value set in this.options.loginField. This would align the implementation with Devise's expectations and prevent potential issues.
The text was updated successfully, but these errors were encountered: