Help using secure setting placeholder {{setting.name}}

Respondida

9 Comentários

  • Eric Nelson
    Zendesk Developer Advocacy
    Hey Mathew,

    Quick review of your code and it looks good. Can you tell us more about the troubles that you're having? Is the auth header undefined or something else when received at the requests url?
     
    Thanks!
    0
  • Mathew Ehrenberg

    I received 401 and 403 errors from the request when the app was installed and using the placeholder. When the basic authentication is hard coded the app functions as normal. When checking the Authorization header in the console, it looks as if it is sending "{{setting.name:PAT}}" as the credentials without swapping out the placeholder resulting in the errors. I am just not sure what to change to fix it.

    0
  • Eric Nelson
    Zendesk Developer Advocacy
    It looks like the base64 encoding is happening prior to the proxy replacing the placeholder with the secure value. An easy option to fix this would be to just save the string already base64 encoded into the secure setting field. That way the encoding isn't happening prior to the request hitting the proxy. 
    0
  • Mathew Ehrenberg

    Unfortunately that didn't seem to work. The auth header came out as "Authorization"Basic {{setting.token}}". String was already encoded as well and updated within the apps settings.

    0
  • Eric Nelson
    Zendesk Developer Advocacy
    Hey Matthew,

    Sorry that I missed your response. Are you still having issues? 
    0
  • Mathew Ehrenberg

    Yeah. The possible solutions haven't worked. Are there any small details I could be missing?

    0
  • Eric Nelson
    Zendesk Developer Advocacy
    Hey Matthew,

    Tough to say, I just spun up a small example repo which you can use as a point of reference / to test out the workflow. 
     
    Hope this helps!
    1
  • Mathew Ehrenberg

    That's amazing. I'll take a look and update if I have any questions. Thank you!

    0
  • Mathew Ehrenberg

    Seems I found the issue. The domainWhiteList property was what was giving issues. Seems I may not have the correct domain in the setting.

    0

Por favor, entrar para comentar.

Powered by Zendesk