LPH
Well-known member
Currently to login to XF externally, I have these three values passed. The
XF2 code includes
What is the purpose of the _xfToken and is it necessary?
_xfToken
is blank.
Code:
<input type="hidden" name="cookie_check" value="0"/>
<input type="hidden" name="redirect" value="<?php echo $redirect ?>"/>
<input type="hidden" name="_xfToken" value=""/>
XF2 code includes
' . htmlspecialchars($this->app['csrf.token']) . '
and so I was trying to figure out how to match it. Below isn't quite right because I'm missing the name-arguments pair needed in the fn.
Code:
<input type="hidden" name="cookie_check" value="0"/>
<input type="hidden" name="redirect" value="<?php echo $redirect ?>"/>
<input type="hidden" name="_xfToken" value="<?php htmlspecialchars( \XF::app()->templater()->fn('', 'csrf.token') ) ?>"/>
What is the purpose of the _xfToken and is it necessary?