JSESSIONID Cookies returned in CRTeamraiserAPI calls don't match existing session (Wordpress)
We've run into an issue with a Teamraiser straddling Wordpress and LO. The question is: is there a way to defer to existing JSESSIONIDs and not receive new JSESSIONID cookies when making API calls? Could this potentially be solved by including xhrFields: {withCredentials: true } in the calls?
The general walkthrough of the issues is below (platform in square brackets):
- [LO] Participant visits site, logs in, is given JSESSIONID A
- [LO] Participant clicks link to visit one of the event pages in WordPress
- [WP] API calls made on page load
- CRConsAPI call made
- Purpose is to verify and persist user session information from LO on WP
- Methods called are LoginTest
- The API call request passes JSESSIONID A
- CRTeamraiserAPI call made
- Purpose is to populate leaderboards
- Methods called are getParticipants, getTeamsByInfo, getCompaniesByInfo
- The API Call request does not pass JSESSIONID A
- The response passes back a new JSESSIONID B, which now exists alongside JSESSION A in the user's cookies ?
- CRConsAPI call made
- [WP] Participant clicks to return to their Participant Center 2 [LO]
- [LO] The participant center doesn't fully load, instead freezing mid loading bar and giving an auth error on an API call in the console. Specifically, JSESSIONID B is scoped by Path to '/CRConsAPI' so it is passed alongside JSESSIONID A in the GetUser method call (as part of the PC3 loading), and breaks the auth match. If JSESSIONID B cookie is deleted and page refreshed then the PC will load.
Tagged:
0
Comments
-
Yes, I'd recommend always setting withCredentials to true on any API request. That is the only way to send cookies in a cross-domain request.
I'd also make sure that you're using the secure path with both CRConsAPI and CRTeamraiserAPI -- if you are using the non-secure path with CRConsAPI then the secure path with CRTeamraiserAPI, that would also cause the issue you're describing (even if you do set withCredentials on the request).1 -
Noah Cooper:
Yes, I'd recommend always setting withCredentials to true on any API request. That is the only way to send cookies in a cross-domain request.
I'd also make sure that you're using the secure path with both CRConsAPI and CRTeamraiserAPI -- if you are using the non-secure path with CRConsAPI then the secure path with CRTeamraiserAPI, that would also cause the issue you're describing (even if you do set withCredentials on the request).
Thanks Noah! Setting withCredentials to true fixed the issue.0
Categories
- All Categories
- 6 Blackbaud Community Help
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 396 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.5K Blackbaud Financial Edge NXT®
- 650 Blackbaud Grantmaking™
- 568 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 937 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.5K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 119 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 239 The Tap (Just for Fun)
- 34 Blackbaud Community Challenges
- 31 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 785 Community News
- 2.9K Jobs Board
- 53 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

