Version: v0.7.0 - Beta.  We welcome contributors & feedback.

Web.csrfToken

Web.csrfToken() -> string

Description

Get the current user’s CSRF token, to be included in all POST requests in the field csrfToken.

This is used to prevent Cross-Site Request Forgery (CSRF) attacks.

To get a complete hidden form field, use Form.csrfTag.

Web.csrfToken()
//= 'AET4bZuK...'  (random value)

See Also