Skip to content

Authentication

There are no built-in mechanisms for handling authentication in Prettynice yet. But the basics of what you need to roll your own are all there: That’s going to be forms, Gren’s Crypto module, Prettynice.Response.setHeader, and Prettynice.Request.Request.headers.

You can use a database or interact with 3rd party APIs using Gren’s HttpClient on the server.

Alternatively, you can get HTTP Basic Auth set up by generating a token for a username/pass of your choice and passing it as an Authorization header with Prettynice.Response.setHeader.