Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cookies]

The tag has no usage guidance.

0
votes
1answer
20 views

How can i set a cookie for a standardController? [duplicate]

I'm doing a test class and i need to set a cookie for my page (ApexPages.StandardController). I have to use something like: apexPages.currentPage().setCookies(); But, since i am simulating a page ...
0
votes
1answer
21 views

Read document cookies in Lightning Component [duplicate]

I want to read the cookies out of the DOM document object. I tried the following: Controller: init : function(component, event, helper) { console.log(document.cookie); // returns nothing } ...
0
votes
1answer
32 views

Cookie with custom expiration

We have Community with two-factor authentication in place, implemented in Login flow. We would like the second factor to be requested only once per 30 days on the device. If the user comes from ...
0
votes
0answers
33 views

Cross Domain Cookies

Need help in one of my projects's requirement to set a cross domain cookies which later can be accessed by a server when we hit a URL from salesforce's VF page. please let me know if someone had ...
3
votes
1answer
211 views

Cookie with HttpOnly flag

I work on Demandware platform, and use dw.web.Cookie class. there is no way to add HttpOnly attribute to the new Cookie. do we have any solution or workaround?
2
votes
2answers
96 views

global scope where all components can access these values

I am writing an Lightning component where I am getting some values form Salesforce backend through Apex Controller. I need these values to be referred across all other components (components which ...
0
votes
0answers
47 views

How to set a secure non-session cookie?

My current setup is a force.com site using a guest user license as well as a URL rewriter class. In the site template, I have added a PageReference action from an extension controller to set a cookie ...
0
votes
1answer
405 views

Using the cookie class with lightning communities

I'm trying to get and set cookies in an AuraEnabled method in conjunction with my lightning community. Right now I'm going off of the cookie class documentation and just trying to get anything to work ...
1
vote
0answers
247 views

Iframe with Windows Authentication in Internet Explorer

Having some real problems getting a Visualforce page to work with Internet Explorer 11. I have the following Visualforce Page: <apex:page controller="MyController"> <iframe frameborder=...
1
vote
1answer
55 views

Setting a cookie in a canvas app?

I have a Java application that sets a cookie: Cookie keks = new Cookie("Demo","WeLoveCookies"); keks.setHttpOnly(true); keks.setSecure(true); keks.setPath("/"); response.addCookie(...
1
vote
1answer
314 views

decryption is throwing System.SecurityException error in apex class

I'm creating community site and storing the password in cookies in the form of encryption. Now I've to decrypt that password. but decryotion is not working. getting below error. System....
1
vote
2answers
225 views

encrypt the Password in Jquery and decrypt in Apex class

I'm creating the custom login page for customer community. Login page has functionality like, Save Username Password, Remember me. When I check the Save Username Password while login, then at the ...
0
votes
2answers
55 views

How to pass data securely between pages

We have a force.com site and we are displaying some products based on the user logged in. We are being passed in the user id from some portal. We are consuming this user id by creating a cookie and ...
0
votes
1answer
101 views

How to use current website cookie information in a new marketing cloud implementation

We are facing similar issue with several potential customers, when going through a Salesforce Marketing Cloud implementation project. My question is how can we use/copy/migrate current cookie ...
0
votes
1answer
56 views

Can .getCookies() somehow get a cookie from another computer on a network?

This is truly bizarre. I have a site page that uses parameters in the url to pass user, email and fullName values. The page's init() then grabs those values and assigns them to variables. If any of ...
0
votes
1answer
162 views

Ssalesforce site cookies list

My salesforce org uses cms force app to build html,vf pages etc and deploy them for sites being used by farm projects. Due to data protection act 1998 EU, my client has requested for types of ...
3
votes
1answer
108 views

Cookies not getting sent Salesforce1

I am working on integrating third party application with Salesforce. As part of integration to the third party, we have an anchor tag( tag) on visualforce page that makes a POST call. The way we do ...
4
votes
0answers
470 views

How to store/use Cookies in salesforce lightning

I am trying to use 3rd party application within my lightning component. I have to store the access token received from the external app. I am planning to store that in Cookies. But ApexPages....
0
votes
1answer
600 views

Render an External Page in an IFrame in a custom VF page

I want to render an External Web page in an IFRAME in custom VF page and retrieve cookies generated by that page in the salesforce. However, I have tried loading that in both apex:iframe as well as ...
1
vote
0answers
116 views

Prevent Apex setCookies prepend prefix 'apex_'

Hi guys as may already know salesforce changed Debug logs for Site Guest User in winter 17. And I ran into a problem, I can't set the cookies from current page controller (Apex Controller), I get the ...
0
votes
0answers
26 views

Winter 17: Site Debug Log stopped for Site Guest Users [duplicate]

Set debug_logs cookie in chrome. Still not able to capture Site Guest Users.
3
votes
1answer
935 views

LockerService throws error when saving a document cookie

I'm getting an error when trying to save a document cookie in Lightning Component. The error I'm receiving is: Cannot set property cookie of [object Object] which has only a getter Can we not ...
2
votes
1answer
262 views

Cookies not stored user session until user logs out

Iam using custom object to store user information. When user logged in am storing username in cookies. So, user user logged into home page and access their information using cookie value. Once user ...
0
votes
1answer
512 views

Achieving Cookie Dependent REST API session

I am working on a application where hitting a button in Salesforce user interface must redirect you to some third party web application session. Below is some sample code that I use to connect: ...
1
vote
1answer
53 views

Jquery Versions Breaking Each Other When loaded in Page. How to Fix Functionality?

I have a Visualforce page in which there are jQuery libraries included. I'm not familiar with why there are more than one library file loaded. I have a VF component included in the Visualforce page ...
1
vote
1answer
514 views

Sites cookies lost on page redirect

We have an intranet Sites application (no Site Login used). Recently, I was extending the application to use cookies across page redirects rather than URL parameters for shared information. To start, ...
1
vote
1answer
786 views

Setting cookies not taking effect in Safari

We have a managed package and are attempting to set a cookie using Apex code as follows: ApexPages.currentPage().setCookies(new Cookie[]{key}); The cookie seems to be set correctly in Opera, Firefox,...
4
votes
1answer
221 views

How can I access a non 'apex__' prefixed cookie?

I have a cookie that is being dropped by an external service into my web browser (for example named my_cookie), that I would like to access within Salesforce. However, according to the documentation ...
1
vote
1answer
228 views

Salesforce Cookies in Apex - How Many Characters Can I Use?

I am currently updating some client code where information is saved via Cookies (through JavaScript). However, I am trying to find an easier way to save all the information at once, as opposed to ...
5
votes
2answers
1k views

How to delete cookies in apex controller while clicking logout button on sites pages

I am using cookies to store user information on sites page using below logic.I am setting cookies when user logged in successfully on sites page Cookie oktauserpwd = new Cookie('userpwd',userpwd,null,...
1
vote
0answers
340 views

BrowserId cookie in customsite vfpage submit

I have a custom website with no user login, with form created in Visualforce page using vfpage compositions, after submit the page, it appears that sfdc creates a cookie called "BrowserId". How can I ...
1
vote
1answer
540 views

Using curl to download zip reports

I am attempting to use curl (or any other viable alternative) to download a zip report from SalesForce, but I seem to be unable to do so. I am using syntax: curl -o my_file.zip 'https://login....
0
votes
2answers
1k views

Assign Javascript variable value to Ampscript

I am using code below to get cookie and assign it to ampscript variable @user function checkCookie() { var user = getCookie("email"); if (user != "") { alert("Checking cookie: " + ...
1
vote
2answers
2k views

Delete cookie data

I've created a cookie as shown and append any newly added data to the cookie: if (cart == null) { //Create an instance of the cookieJar class, passing it the values entered in the ...
1
vote
1answer
704 views

Storing session/cookie in VF pages

I have a product details page which displays 1 product, there's an Add to Cart button for user to click. When user click on Add to Cart, the cart will be displayed at the bottom on the same page. I'...
2
votes
1answer
302 views

Failing to Destroy a Cookie

I have a class that gets the params from the URL, then if the system already have a cookie it retrieves their value. if the system doesnt have a cookie it creates a cookie and assign a value. Then ...
3
votes
1answer
322 views

Does salesforce1 support storing and retrieving Cookie values in Visualforce pages?

I've a VF page that is storing value of a checkbox option. I don't want this option to be a persistent value like in CustomSetting or somewhere as a record. I just want to maintain the value as a ...
3
votes
0answers
290 views

Load VF login form data on startup

I have VF Login page for portal user where I am trying to save few fields which includes inputtext and picklist so when user close the browser and come back again then the same information appear back ...
9
votes
1answer
758 views

Read cookies in an Apex @RestResource

I'm trying to read some cookies set by previous requests in an Apex REST handler. I can see the cookie is sent to the page by my browser (using the Cookie HTTP header), but if within the Apex code I ...
2
votes
0answers
403 views

How to share cookies between subdomains?

We are using cookies on our force.com site which is under domain support.example.com but we have other non-force.com applications on another subdomain i.e. search.example.com. How can I define the ...
1
vote
1answer
2k views

Salesforce Cookies behaving differently by introducing Model class using IE

The following is the Model object shared between two controllers and works well using Chrome and Mozilla browsers: PortalTest.cls // @params /* 'cookieCheck', _, 86400, false */ public ...
5
votes
1answer
1k views

HttpOnly Cookies Not Available in Apex

When making an HTTP callout using HttpRequest, Set-Cookie headers returned with the HttpOnly flag are not included in the HttpResponse. This appears to be consistent with RFC 6265: The HttpOnly ...