Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging an App locally with zcli proxy error #191

Open
slavoroi opened this issue Jul 9, 2023 · 0 comments
Open

Debugging an App locally with zcli proxy error #191

slavoroi opened this issue Jul 9, 2023 · 0 comments
Labels
verified issue has been successfully reproduced

Comments

@slavoroi
Copy link

slavoroi commented Jul 9, 2023

Expectations

Debugging locally with ?zcli_apps=true should be possible with proxy server.

Reality

When debugging locally and trying to call google authenitcation api call for example I get proxy errors and a code of 422.
It works in production, but doesn't work locally with "?zcli_apps=true"

  Proxy error: {:code=>"UnprocessableEntity", :status=>"422", :title=>"Unprocessable Entity", :message=>"Failed to get installation and oauth information for app."}

Steps to Reproduce

  1. Run Zendesk app locally with local zcli.apps.config.json that has setting.apiKey & setting.email & setting.password and calling proxy server.

Issue details

running this code fails with proxy server:

const AUTH_URL =
  'https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key={{setting.apiKey}}';

async function authenticate() {
  const settings = {
    url: AUTH_URL,
    type: 'POST',
    contentType: 'application/json',
    data: JSON.stringify({
      email: '{{setting.email}}',
      password: '{{setting.password}}',
      returnSecureToken: true,
    }),
    secure: true,
    dataType: 'json',
  };

  const response = await _client.request(settings);
  return response.idToken;
}

Also, I tried adding "https://joindaisy.zendesk.com/" as an allowed domain in firebase.

oI_wMFB8Rb_RcCYO2V1jZw (1)

  • Command: zendesk:build
  • Version: 1.0.0-beta.35 & 1.0.0-beta.32
  • OS: MAC OS ventura 13.4.1
@anushkafka anushkafka added the verified issue has been successfully reproduced label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified issue has been successfully reproduced
Projects
None yet
Development

No branches or pull requests

2 participants