I have made a project for sharing the contents of file and folder in alfrecso.The github link for my project is
GitHub - ayushiagrahari95/share-link-expiry-file-and-folder and it is working fine on local but when I have deployed the amps on production,whenever I click on the make public action,a URL is generated on the folder and when I click on that URL,it is asking for authentication (prompts the user to enter the username and password) but on local,the URL is opening properly in the new tab without asking for authentication.
I am unable to figure out why the URL is asking for authentication on prod and not on local.
It's cool you made that code available on github, but maybe grab the section you think might be the problem and post it here so people don't have to go hunt for it. For example, what URL are you generating for the folder?
I am trying to call the repo webscript from share side.
The space-list.js file in share-link-expiry-file-and-folder/Ev-share-make-public-share/src/main/resources/META-INF/components/make-public is calling the repo webscript in the following way
var requestUrl =window.location.protocol+"//"+window.location.host+"/alfresco/s/eu/xfel/make-public/doclist?nodeRef="+this.options.nodeRef+"&guest=true";
The doclist repo webscript is a webscript that has guest authentication but on calling this webscript on prod,the url that is generated is asking for authentication and is able to call the repo side webscript only after authentication.
I am not able to figure out why it is asking for authentication in prod and not in local
Yes,I have added the guest access with consumer access to the node in the local as well as production but as I have already told u that the amps of project is working perfectly on local but the issue is actually when I deploy the amps on production.
I can't figure out why it is asking for authentication on production but not on local
Another advantage of doing that is that Share will handle repo authentication for you and you won't have to fool with Guest access.