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

various SLAS adjustments, added callbackURIs #318

Merged

Conversation

sandragolden
Copy link
Contributor

Mostly just fixing some minor typos in params, also added callback URIs needed for password resets and passwordless login

cc: @hnestmann

@@ -2062,11 +2064,12 @@ program
const secret = options.secret;
const channels = !options.channels || options.channels.split(',').map(item => item.trim());
const scopes = !options.scopes || options.scopes.split(',').map(item => item.trim());
const redirecturis = !options.redirecturis || options.redirecturis.split(',').map(item => item.trim());
const redirecturis = options.redirecturis ? options.redirecturis.split(',').map(item => item.trim()) : [];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs to be set to an empty array if the client does not have redirectURLs (passwordless login)

lib/slas.js Outdated Show resolved Hide resolved
@@ -120,7 +120,7 @@ const slas = {
handleCLIError('Could not get tenant: ', e.message, asJson)
}
},
list: async (shortcode, tenantId, asJson) => {
list: async (tenantId, shortcode, asJson) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

order from cli expects the reverse:
await slas.cli.client.list(options.tenant, options.shortcode, asJson);

Copy link
Contributor

@clavery clavery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sandragolden
Copy link
Contributor Author

sandragolden commented Sep 3, 2022

@tobiaslohr This should be ready to merge. I double checked all the commands via the command line as well as via the JS API and they all work without error with the exception of slas:tenant:list and slas:tenant:delete which are restricted to staff only / internal role. I wasn't able to get the JS API to work at all because of auth errors so I added token as the last parameter for all of the API functions.

I don't think there are any breaking-changes here. I switched the order of the params on slas.cli.client.list because that was throwing an error because the params were reversed (issue #265). I added callbackuris to client:add which shouldn't be breaking either. All the other updates were errors (like callbackuris and redirecturis need to always be arrays if null is passed in).

I see this is failing build-and-test in CircleCI but I don't think that's from any changes I've made as the same errors look to be thrown in the master branch. Let me know if I need to take a look at that.

@tobiaslohr tobiaslohr added the bug Something isn't working label Nov 16, 2022
@tobiaslohr tobiaslohr added this to the 2.10.0 milestone Nov 16, 2022
@tobiaslohr tobiaslohr merged commit a9b282e into SalesforceCommerceCloud:master Nov 16, 2022
@tobiaslohr
Copy link
Contributor

Thanks for your contribution @sandragolden!

@sandragolden sandragolden deleted the bugfix/slas-updates branch April 3, 2023 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants