persona.js icon indicating copy to clipboard operation
persona.js copied to clipboard

make additional CSRF protection possible

Open lloyd opened this issue 13 years ago • 1 comments

Currently it's not possible for a site to pass extra parameters into the POST requests that will occur.

We should allow them to pass through parameters, like CSRF tokens and whatever else they want.

While designing the library to use POST requests does provide a basic level of protection, there are still scenarios where we may be encouraging a design that would allow unwanted logouts to occur...

lloyd avatar Jul 21 '12 19:07 lloyd

@benadida writes:

Well, it might be a bit too paternalistic to prescribe a CSRF parameter name, since sites might be using one already and different frameworks have different names for the parameter, so I would suggest something along the lines of:

  • allow extra parameters, CSRF or otherwise
  • in all examples, use a CSRF token and explain why
  • optionally, if no extra extra parameters are given, console.log a nudge?

lloyd avatar Jul 21 '12 21:07 lloyd