Replies: 1 comment
-
Because you can add and remove strategies at runtime, there's no way AFAIK to have them typed in TS. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, whenever I submitted strategy using use method in Authenticator, such as:
I'd like authenticate method in Authenticator to show keys of whatever strategies I've submitted in the first parameter which is strategy:string.
So basically, I set two strategy, one is called
"user-pass"
the other is"otp"
Then in somewhere, I call
authenticator.authenticate(""),
now at this point, I'd like typescript to guide me on what to write for the first parameter as if I would define a string literal type, like:but generated dynamically based on strategies set before, is it possible?
Beta Was this translation helpful? Give feedback.
All reactions