Focuses on API authentication, access scopes, and permission management.
Hi! I am new to shopify, but I have several years experience with web developing.
I recently installed a third-party app called Discount Depot, and they requested for collaborator access to help fix an issue in my store. I gave them the permissions I felt confident delegating, but the permission "Online Store -> Themes -> Edit code" raises me a concern.
How can I be sure the collaborator won't insert malicious code somewhere in my code? Is there any way to track what changes the collaborator has done in the code? If not, and some malicious code is inserted, how am I supposed to locate this code?
Would appreciate some guidance here, in terms of best practices of security. Thanks!
If you don't feel comfortable granting that access, then don't.
But if you don't grant the access, then it's your responsibility to make the changes to your theme to make the app work. Ask them which code changes need to be made, and then either code it yourself, or hire a developer to do it for you.
Is there no way to see what changes the collaborator have executed while editing my code?
Sure you can, but it's not built into Shopify:
1. Make a backup of your theme.
2. Commit all files to a new Git repository.
3. After the third-party has edited your code, download all files into the repository again.
4. Run `git diff` in your terminal, so that you can see exactly which lines were changed.
As you can imagine, this approach requires some knowledge of the command line, as well as an understanding of coding, so that you can understand what changes they have made.
If you have any further questions about this, reply and let me know.
That's just genius, thank you so much! I have knowledge of this, so this is absolutely doable for me 🙂