Skip to content

Commit 79ea124

Browse files
authored
Merge pull request #335 from scientist-softserv/316-more-cookies
316 more cookies
2 parents 4862ba5 + ad15d0c commit 79ea124

File tree

3 files changed

+26
-78
lines changed

3 files changed

+26
-78
lines changed

pages/_app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ const WebStore = ({ Component }) => {
3535

3636
return (
3737
<>
38-
<CookiePreferencesModal
38+
{/* <CookiePreferencesModal
3939
disableCookies={disableCookies}
4040
enableCookies={enableCookies}
4141
getCookieConsent={getCookieConsent()}
42-
/>
42+
/> */}
4343
<Header
4444
auth={{
4545
signIn: () => signIn(process.env.NEXT_PUBLIC_PROVIDER_NAME),

pages/legal-notices/cookie-policy.js

Lines changed: 15 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ const CookiePolicy = () => (
55
<div className='container'>
66
<Title title='Cookie Policy' style={{ marginTop: '1rem' }} />
77
{cookiePolicy}
8-
<h2>Cookie Preferences</h2>
8+
{/* <h2>Cookie Preferences</h2>
99
<p> Please provide your consent below to our use of non-essential cookies on our site.
1010
You may withdraw your consent at any point by following the instructions above or by
1111
returning to this page and changing your selection.</p>
1212
<CookiePreferencesCheck
1313
cookieConsentValue={cookieConsentValue}
1414
disableCookies={disableCookies}
1515
enableCookies={enableCookies}
16-
/>
16+
/> */}
1717
<div className='mb-4'></div>
1818
</div>
1919
)
@@ -31,9 +31,9 @@ const cookiePolicy = (
3131
<ul>
3232
<li><strong>Strictly necessary cookies.</strong> These are cookies that are required for the operation of our site. They include, for example, cookies that enable you to log into secure areas of our site or make use of services. We do not require your consent to place these cookies. Nevertheless, you may be able to block these cookies yourself on your device/browser, but restricting these cookies is likely to mean that our site will not work as you would expect and certain functionality may be inoperable.</li>
3333
<p style={{textDecoration: 'underline'}}><strong>Non-essential cookies</strong></p>
34-
<li><strong>Analytical/performance cookies.</strong> They allow us to recognise and count the number of visitors and to see how visitors move around our site when they are using it. This helps us to improve the way our site works, for example, by ensuring that users are finding what they are looking for easily. We use cookies to compile visitor statistics such as how many people have visited our site, how they reached our site, what type of technology they are using (e.g. Mac or Windows which helps to identify when our site isn't working as it should for particular technologies), how long they spend on the site, what page they look at etc. This helps us to continuously improve our website.</li>
34+
{/* <li><strong>Analytical/performance cookies.</strong> They allow us to recognise and count the number of visitors and to see how visitors move around our site when they are using it. This helps us to improve the way our site works, for example, by ensuring that users are finding what they are looking for easily. We use cookies to compile visitor statistics such as how many people have visited our site, how they reached our site, what type of technology they are using (e.g. Mac or Windows which helps to identify when our site isn't working as it should for particular technologies), how long they spend on the site, what page they look at etc. This helps us to continuously improve our website.</li>
3535
<li><strong>Functionality cookies.</strong> These are used to recognise you/your language when you return to our site. This enables us to personalise our content for you and remember your preferences (for example, your choice of language or region).</li>
36-
<li><strong>Targeting cookies.</strong> These cookies record your visit to our site, the pages you have visited and the links you have followed. This information will be used by us and third parties to make our site and the advertising displayed on it more relevant to your interests. We may also share this information with third parties for this purpose but only if you consent to such sharing.</li>
36+
<li><strong>Targeting cookies.</strong> These cookies record your visit to our site, the pages you have visited and the links you have followed. This information will be used by us and third parties to make our site and the advertising displayed on it more relevant to your interests. We may also share this information with third parties for this purpose but only if you consent to such sharing.</li> */}
3737
<li><strong>Social Website Cookies.</strong> We have included buttons on our site for certain social media sites such as Facebook, Twitter and Instagram. These cookies are set by the third party social media sites to which they relate.</li>
3838
</ul>
3939
<p>The privacy implications vary from social media site to social media site and will be dependent on the privacy settings you have chosen on these sites. Please refer to the relevant social media site's privacy and cookies policy for more information.</p>
@@ -60,10 +60,10 @@ const cookiePolicy = (
6060
</tr>
6161
<tr>
6262
<td>
63-
_rx_session
63+
__Secure-next-auth.session-token
6464
</td>
6565
<td>
66-
End of browser session
66+
30 days
6767
</td>
6868
<td>
6969
Scientist.com
@@ -74,75 +74,33 @@ const cookiePolicy = (
7474
</tr>
7575
<tr>
7676
<td>
77-
_rx_cookie_consent
77+
__Host-next-auth.csrf-token
7878
</td>
7979
<td>
80-
1 year
80+
End of browser session
8181
</td>
8282
<td>
8383
Scientist.com
8484
<br />
8585
<br />
86-
This cookie stores the user's cookie consent status.
86+
This cookie provides cross site request forgery protection on authentication routes.
8787
</td>
8888
</tr>
8989
<tr>
9090
<td>
91-
intercom-lou-XXX
92-
</td>
93-
<td>
94-
1 year
91+
__Secure-next-auth.callback-url
9592
</td>
9693
<td>
97-
Intercom cookie
98-
<br />
99-
<br />
100-
This cookie helps to remember the user between visits and resume chat conversations.
101-
</td>
102-
</tr>
103-
<tr>
104-
<td>
105-
intercom-session-XXX
106-
</td>
107-
<td>
108-
1 week
109-
</td>
110-
<td>
111-
Intercom cookie
112-
<br />
113-
<br />
114-
This cookie enables us to track the user's session, including maintaining continuity in chat conversations.
115-
</td>
116-
</tr>
117-
<tr>
118-
<td>
119-
intercom-id-XXX
120-
</td>
121-
<td>
122-
1 year
123-
</td>
124-
<td>
125-
Intercom cookie
126-
<br />
127-
<br />
128-
This cookie enables us to distinguish users.
129-
</td>
130-
</tr>
131-
<tr>
132-
<td>
133-
NID
134-
</td>
135-
<td>
136-
6 months
94+
End of browser session
13795
</td>
13896
<td>
139-
Google
97+
Scientist.com
14098
<br />
14199
<br />
142-
This cookie contains a unique ID that identifies a returning user's device. Used by Google’s reCAPTCHA service to prevent spam.
100+
This cookie allows for proper redirection during the sign up/in process.
143101
</td>
144102
</tr>
145-
<tr>
103+
{/* <tr>
146104
<td colSpan={3} style={{textDecoration: 'underline'}}>
147105
<strong>Non-essential cookies</strong>
148106
</td>
@@ -273,7 +231,7 @@ const cookiePolicy = (
273231
<br />
274232
This cookie enables us to remember the last language visited.
275233
</td>
276-
</tr>
234+
</tr> */}
277235
</tbody>
278236
</table>
279237
<p>Please note that third parties (including, for example, providers of external services like web traffic analysis services) may also use cookies, over which we have no control. These cookies are likely to be analytical/performance cookies or targeting cookies.</p>

utils/cookies.js

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,14 @@ import {
66
} from 'cookies-next'
77

88
/**
9-
* TODO: determine if/how to handle cookies
10-
* ref: https://assaydepot.slack.com/archives/C05U031L0V9/p1701363833246969
11-
* tldr: no rx session cookies are being set, and google analytics isn't enabled
12-
*
13-
* if we want to handle cookies, we need to readdress enableCookies() and disableCookies()
9+
* if/when we add analytics, we need to address the following TODO's, as well as the TODO's in the code below
10+
* - uncomment CookiePreferencesModal in pages/_app.js
11+
* - uncomment CookiePreferencesCheck, the header and text in pages/legal-notices/cookie-policy.js
1412
*/
1513

1614
const cookieConsentGiven = hasCookie('_dl_cookie_consent')
1715

18-
export const getCookieConsent = () => cookieConsentGiven // delete this and uncomment the line below to re-enable cookie consent
19-
// export const getCookieConsent = () => !cookieConsentGiven
16+
export const getCookieConsent = () => !cookieConsentGiven
2017

2118
export const cookieConsentValue = cookieConsentGiven ? getCookie('_dl_cookie_consent') : 'false'
2219

@@ -33,23 +30,16 @@ const cookieOptions = {
3330

3431
export const enableCookies = () => {
3532
// TODO(alishaevn): check for the presence of non essential (analytics) cookies. if none, enable them.
36-
// setCookie('_dl_cookie_consent', 'true', cookieOptions)
33+
setCookie('_dl_cookie_consent', 'true', cookieOptions)
3734
}
3835

3936
const nonEssentialCookies = [
40-
'__ga',
41-
'__gid',
42-
'__utma',
43-
'__utmt',
44-
'__utmb',
45-
'__utmc',
46-
'__utmz',
47-
'__utmv',
48-
'pll_language'
37+
// TODO(alishaevn): create this list
38+
// TODO(alishaevn): add these cookies to pages/legal-notices/cookie-policy.js under "Non-essential cookies" with a description and expiration time frame
4939
]
5040

5141
export const disableCookies = () => {
52-
// nonEssentialCookies.forEach(cookie => deleteCookie(cookie))
42+
nonEssentialCookies.forEach(cookie => deleteCookie(cookie))
5343
// TODO(alishaevn): after deleting the cookies, we need to also disable them
54-
// setCookie('_dl_cookie_consent', 'false', cookieOptions)
44+
setCookie('_dl_cookie_consent', 'false', cookieOptions)
5545
}

0 commit comments

Comments
 (0)