0.373 (27 Nov 2023)

27 November, 2023

These changes have been released with version 0.373 of the CLI.

Setting the HTTP response status code

​You can now set the HTTP status code of the response from your function, which can be useful (or necessary) for many reasons. For example, you may want to return a redirect response as illustated in the code snippet below.

export default MyRedirectFunction((inputs, api, ctx) => {
  // do some stuff...
 
  // return a redirect
  ctx.response.headers.set("Location", "https://some.url.com/");
  ctx.response.status = 302;
  return null;
});

Another reason to set the response status code might be because you are integrating with a 3rd-party webhook and that webhook is expecting some specific status code to be returned, such as a 201.

Mutating the id field

It is now possible to set the value of a model's built-in id field when creating or updating data. We also support this when creating nested records. Have a look at the simple example below.

model Person {
  fields {
    name Text
    employer Employer
  }
 
  actions {
    // Create a person with a custom id, and a related employer with a custom id
    create createPerson() with (id, name, employer.id, employer.name)
 
    // Update a person's id
    update updatePerson(id) with (id)
  }
}

3rd-party Authentication

We have been working on providing support for integrating your Keel app with third-party authentication providers, such as Google, Facebook and the likes. In the previous release, we shipped our new OAuth endpoints and OIDC Token authentication.

Single Sign-On authentication (pre-release)

Today we have shipped a pre-release of Single Sign-On authentication.

With this flow, Keel provides an abstraction over all the complex OAuth gymnastics which you would normally need to build into for your application. This is especially useful if you want to support multiple different authentication providers (such as Google, Facebook, GitLab, etc.). What this means is that all you need to do is provide some simple configuration in your keelconfig.yaml file, integrate with a singular auth endpoint, and then leave the rest to us.

🙋‍♂️

This feature is not yet publicly available, nor have we published documentation for it, but if you would like to get started early then please do raise your hand on our Discord channel. We'll happily work with you on getting integrated.

Fixes and Improvements

We've also released a bunch of fixes and improvements (opens in a new tab) to our CLI and the SDK packages, and to our VS Code extension.

For any issues or feedback, please visit the support channel on our community discord (opens in a new tab) or contact us at help@keel.so.

Thank you for using Keel!