How to override DamlHubLoginBtn with Token
- Joao_FreitasOP
Hi everyone

I am trying to implement a login on DAML hub using the DamlHubLoginBtn with the withToken property.
My main goal is to somehow mock a login with username and password but under the wood what I will be doing is a token login on damlHub.
Is it possible to override the default form from DamlHubLoginBtn and the onSubmit function or is the onLogin method passed as props on the method.token.render ?
Thanks in advance
- sarah.breckenridge 1
Joao -
So, by the looks of the implementation here,
options.method.tokentakes a hard-coded render functiononSubmit. However, there could be a way to manipulate when (or if)onSubmitgets called by passing in a component tooptions.method.toke.renderthat takes anonSubmitfunction that either does not call it or performs an action before calling it.Let me know if that is helpful, happy to collaborate on this more if needed.
Best,
Sarah