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
Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.
Thank you in advance for helping us to improve this library! Your attention to detail here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.
By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
At the moment of this issue, the JwtHelperService.decodeToken method has a return type of any and the user cannot hint the type of the returned value, even if it is known beforehand.
Describe the ideal solution
The user should be able to tell the type of the returned value if it's known beforehand, and have a return type of any only when the user doesn't specify it. With only the addition of a generic type parameter to the method (that defaults to any), it could allow for the consumer to hint the type of the returned value, with no breaking changes at all.
Alternatives and current work-arounds
The current workaround is to always use a type assertion on the returned value, like <MyToken> jwtHelperService.decodeToken( 'token string' ) to override the type of the expression.
Additional context
I have downloaded the repository and tried the proposed solution and it works. The screenshots are published here: Imgur album.
The text was updated successfully, but these errors were encountered:
Please do not report security vulnerabilities here. The Responsible Disclosure Program details the procedure for disclosing security issues.
Thank you in advance for helping us to improve this library! Your attention to detail here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community or Auth0 Support. Finally, to avoid duplicates, please search existing Issues before submitting one here.
By submitting an Issue to this repository, you agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
Describe the ideal solution
Alternatives and current work-arounds
Additional context
The text was updated successfully, but these errors were encountered: