silverfin / silverfin-cli

Command line tool for Silverfin template development
4 stars 1 forks source link

Update getAccessToken to use BASE_URL host #140

Closed JVersee closed 1 month ago

JVersee commented 1 month ago

Description

The AccessToken request fails for the MYOB stack since the base URL is set to api.getsilverfin.com. In order to solve this, we need to modify it to use the configured BASE_URL instead. This should also solve potential future issues with SSO subdomains, since both /oauth/authentication and /oauth/token should be run on live.getsilverfin or the SSO subdomain.

If no process.env.SF_HOST is set the constant will use live.getsilverfin.com instead. So this should ensure backwards compatibility which means that this change doesn't cause any breaking changes.

Fixes # (link to the corresponding issue if applicable)

Type of change

Checklist