Skip to main content
gowrishankarp21
Level 2
Mar 16, 2016 5:10 PM UTC
Solved

CSRF token not available for the login AJAX POST request

We are upgrading from CQ 5.6 to 6.1, Our login POST AJAX request is failing due to invalid CSRF token. On Debugging we noticed that /libs/granite/csrf/token.json is returning a valid token only after successful CRX login otherwise it is returning an null value. So at the time of login, CSRF-Token is undefined and it is causing login post request to fail. Is there anyway to exempt the login post request alone from CSRF filter? or how can we fix this

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
gowrishankarp21
gowrishankarp21Accepted solution
Level 2
Mar 17, 2016 12:29 PM UTC

Thanks,

The "j_validate" field was missing in our login form, once we added it, it resolved the issue.

3 replies

smacdonald2008
Level 10
Mar 16, 2016 5:17 PM UTC

See this Ask the AEM Community Experts - Justin - our AEM Evangelist cover this : 

https://helpx.adobe.com/experience-manager/using/secure_sites.html

See the link the webinar at the start of the article - in the table at the start of the article. 

Translate
gowrishankarp21
gowrishankarp21AuthorAccepted solution
Level 2
Mar 17, 2016 12:29 PM UTC

Thanks,

The "j_validate" field was missing in our login form, once we added it, it resolved the issue.

Translate