How to override DamlHubLoginBtn with Token

Hi everyone :slight_smile:

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

Joao -

So, by the looks of the implementation here, options.method.token takes a hard-coded render function onSubmit. However, there could be a way to manipulate when (or if) onSubmit gets called by passing in a component to options.method.toke.render that takes an onSubmit function 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.



1 Like