[Flask] Flask-Security authentication in JS

Corey Boyle coreybrett at gmail.com
Wed Sep 2 14:42:14 CEST 2015


Maybe this could help.
https://github.com/miguelgrinberg/flasky/issues/60

On Wed, Sep 2, 2015 at 8:10 AM, Morgan Connolly <connollymorg at gmail.com> wrote:
> I have a Flask app that uses Flask-Security for authentication, which is
> storing authentication details in cookies on the client side. Currently, it
> is a static app rendered using Jinja templates, but now I want to implement
> some features which require access to protected resources dynamically via
> JavaScript.
>
> If I send a request using JavaScript to a URL, the cookies won't be
> transmitted. If I want to transmit the username/password with each request,
> I will have to pass it to Jinja in cleartext.
>
> I'm at a total loss here, and I do not know what to do. Can somebody point
> me in the right direction?
>
> Cheers
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>


More information about the Flask mailing list