Commit ddcdaa7
Make logged-in cookie name configurable via options (#5430)
The logged-in cookie name was hardcoded as 'loggedIn' with TODO comments
indicating it should be configurable. This is needed for deployments
where multiple Apostrophe instances share a domain (e.g., staging and
production on subpaths) and need distinct cookie names to avoid conflicts.
Changes:
- Added 'loggedInCookieName' option to the login module (defaults to
'loggedIn' for backward compatibility)
- Replaced all hardcoded references with self.loggedInCookieName
- Removed the TODO comments
Usage:
modules: {
'@apostrophecms/login': {
options: {
loggedInCookieName: 'myAppLoggedIn'
}
}
}
Addresses the TODO comments:
'get cookie name from config'
Co-authored-by: Vangalla, Rohith <rohith.vangalla@optum.com>1 parent 33bb4c0 commit ddcdaa7
1 file changed
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| |||
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | | - | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
| 937 | + | |
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| |||
1201 | 1201 | | |
1202 | 1202 | | |
1203 | 1203 | | |
1204 | | - | |
1205 | | - | |
| 1204 | + | |
1206 | 1205 | | |
1207 | 1206 | | |
1208 | 1207 | | |
| |||
0 commit comments