I’m using Backendless with a Webflow site and the JS SDK. I’ve added a registration/login form to Webflow and can successfully login via the JS SDK and whilst the user-token gets set in the local storage (along with a Backendless_xxxx… about login persistence etc), I don’t get any cookie saved.
I have cookie-based authorisation turned on but it doesn’t seem to work.
And am initialising with my app ID and the JS api key. I have a login form and this function to login…
var user = new Backendless.User();
user.email = emailInput.value;
user.password = passwordInput.value;
Backendless.UserService.register( user ).then( userRegistered ).catch( gotError );
Which logs the user in correctly. Then I see a new entry in the cookie domains with a guid BUT there are no cookies for that entry. Subsequently trying to access a secure file via the URL fails with a permission error. If I refresh the page this empty ‘domain’ in the cookies list disappears until I log in again.
Sorry, just I am using the login one, pasted the wrong one here. The issue still remains though that no cookie gets created. Has it got anything to do with my Webflow site being on a completely different domain?
Ok so I have everything on the same root domain but still no cookie getting set. Can I send private messages to give you the URL’s to see what the issue is? I’m trialling this for a client and need to ensure this use case works.
Can I at least check if this is supposed to work with the JS SDK on an external site (like Webflow or Wordpress etc)? If not then I’ll need to use Amazon S3 for file storage and secure URL’s via Cloudfront.
The problem in your case is caused by fact that your front is under different subdomain. Due to this auth cookie is ignored when it returned by “login” request.
We are currently investigating if it possible to fix this issue on the level of our SDK.