Skip to content
CCPEDIAby Unity Nodes
Discussions/App Development/How to override DamlHubLoginBtn with TokenForum ↗

How to override DamlHubLoginBtn with Token

App Development2 posts301 views1 likesLast activity Nov 2022
JO
Joao_FreitasOP
Nov 2022

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

SA
sarah.breckenridge
Nov 2022

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.

Best,

Sarah

← Back to Discussions