# Auth0-lock Dynamic signUpTitle

**URL:** <https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810>\
**Category:** Get Help\
**Tags:** login, lock\
**Created:** [November 12, 2018, 11:47am UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810 "2018-11-12T11:47:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![j.lim](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/j.lim/32/13907_2.png) [@j.lim](https://community.auth0.com/u/j.lim)\
**Post date:** [November 12, 2018, 11:47am UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/1 "2018-11-12T11:47:13Z")

</div>

Hi,

Is there a way for to change the signUpTitle of the lock component without calling new Auth0Lock again?

I’m looking for something like the following [here](http://community.auth0.com/t/hosted-login-dynamic-lock-title/9481)  
However I am not hosted.

What I am looking to do is something like the below which does not work.

> var options = {  
> languageDictionary: {  
> title: ‘loginTitle’,  
> signUpTitle: ‘signUpTitle’,  
> }  
> }
> 
> var lock = new Auth0Lock(‘clientID’, ‘[account.auth0.com](http://account.auth0.com)’, options);
> 
> lock.authorize({signUpTitle: ‘newSignUpTitle’});`

Then some where down the line call it again to change the title in the text.

> lock.authorize({signUpTitle: ‘anotherSignUpTitle’});

At the moment I am calling `new Auth0Lock('clientID', 'account.auth0.com', options);` every time I need to change the title.

However performance concerns were brought up and with re instancing it and I am now looking for another solution.

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 12, 2018, 12:16pm UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/2 "2018-11-12T12:16:56Z")

</div>

Hi! You wrote `lock.authorize()` in the code sample. Did you mean `lock.show()`?

If so, unfortunately the `languageDictionary` option is not one of the options that can be overridden when using `show()`.

---

<div class="post-metadata">

**Author:** ![j.lim](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/j.lim/32/13907_2.png) [@j.lim](https://community.auth0.com/u/j.lim)\
**Post date:** [November 12, 2018, 9:22pm UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/3 "2018-11-12T21:22:47Z")

</div>

Thank you for your reply I wasn’t expecting it to be so quick!

I am using lock.show() I saw that hosted there was something that looked like it dynamically update the signUpTitle and was hoping that there was something similar for non-hosted that I could call multiple times without creating a new auth0Lock object.

So is the design if you want to change the title you must re-instance the object?

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 13, 2018, 1:39am UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/4 "2018-11-13T01:39:14Z")

</div>

> So is the design if you want to change the title you must re-instance the object?

That is correct. The thread you posted to mentions changing the title based on the parameters used to request an authorization but Lock is instantiated just once.

The `languageDictionary` is designed to address translation or branding needs, but dynamically changing text is not in scope. What is the use case that requires changing the title on the fly?

---

<div class="post-metadata">

**Author:** ![j.lim](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/j.lim/32/13907_2.png) [@j.lim](https://community.auth0.com/u/j.lim)\
**Post date:** [November 13, 2018, 1:51am UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/5 "2018-11-13T01:51:37Z")

</div>

Thank you for taking the time to clarify the authorize({}) it is much appreciated.

My use case is I have multiple different actions that show the lock and I need the signUpTitle to be different depending on which action the user clicked.

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 13, 2018, 2:29am UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/6 "2018-11-13T02:29:37Z")

</div>

> [@j.lim](#):
>
> My use case is I have multiple different actions that show the lock and I need the signUpTitle to be different depending on which action the user clicked.

But isn’t the sign up flow always the same, regardless of the action that the user is trying to accomplish after signing up?

---

<div class="post-metadata">

**Author:** ![j.lim](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/j.lim/32/13907_2.png) [@j.lim](https://community.auth0.com/u/j.lim)\
**Post date:** [November 13, 2018, 2:47am UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/7 "2018-11-13T02:47:54Z")

</div>

The flow is the same after the lock shows.  
The change is cosmetic which is why the question was asked if it needed to be re-instanced.

Which I guess the take away is yes it must be re-instanced?

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [November 13, 2018, 10:00am UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/8 "2018-11-13T10:00:13Z")

</div>

Yes, to change the text you must create a new instance of Lock. Another option is to not create the instance until you know what text you are going to need.

---

<div class="post-metadata">

**Author:** ![j.lim](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/j.lim/32/13907_2.png) [@j.lim](https://community.auth0.com/u/j.lim)\
**Post date:** [November 13, 2018, 9:31pm UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/9 "2018-11-13T21:31:10Z")

</div>

It’s when the user cancels the action they clicked that we change the text on subsequent actions.

However I believe this answers my question for now.

Thank you for taking the time to explain.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 13, 2018, 9:31pm UTC](https://community.auth0.com/t/auth0-lock-dynamic-signuptitle/17810/10 "2018-12-13T21:31:15Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
