Skip to main content
Best answer

Add helpText to Password field on Basic Auth


anfuca

Hi, I’m creating a custom app and I need to put a help text into de password field on the basic auth form.

How can I achieve it?

 

Thanks

Best answer by ikbelkirasanBest answer by ikbelkirasan

@anfuca I think it’s not possible to edit the authentication fields when using Basic auth. So, I’d suggest you use API Key auth instead. You will then be able to add the username and password fields and customize their helpText value.

That said, you’ll still have to include authentication header by yourself. The Basic authorization header can be calculated as follows:

return z.request({
  //...
  headers: {
    Authorization:
      "Basic " +
      Buffer.from(
        `${bundle.authData.username}:${bundle.authData.password}`
      ).toString("base64"),
  },
});

 

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • July 11, 2020

@anfuca - Are you building with the CLI or the Visual Builder?


anfuca
  • Author
  • Beginner
  • 5 replies
  • July 11, 2020

@ikbelkirasan with the Visual Builder


ikbelkirasan
Forum|alt.badge.img+12
  • Zapier Expert
  • 555 replies
  • Answer
  • July 11, 2020

@anfuca I think it’s not possible to edit the authentication fields when using Basic auth. So, I’d suggest you use API Key auth instead. You will then be able to add the username and password fields and customize their helpText value.

That said, you’ll still have to include authentication header by yourself. The Basic authorization header can be calculated as follows:

return z.request({
  //...
  headers: {
    Authorization:
      "Basic " +
      Buffer.from(
        `${bundle.authData.username}:${bundle.authData.password}`
      ).toString("base64"),
  },
});

 


anfuca
  • Author
  • Beginner
  • 5 replies
  • July 12, 2020

Hi @ikbelkirasan 

Just changed to API Key as you suggest, and everything works perfect. 

Thanks for your help!