Skip to content

Releases: portier/portier-node

v0.7.0

01 Dec 10:58
Compare
Choose a tag to compare
  • BREAKING: This PR reverts the API change made to the verify method in v0.6.0:

    -async verify(token: string): Promise<{ email: string; state?: string }> {
    +async verify(token: string): Promise<string> {

    v0.6.0 mistakenly assumed state was part of the token, but it is simply returned in a query parameter state to the callback / redirect URI. As such, your application can extract it directly from the request.

v0.6.0

29 Nov 14:43
Compare
Choose a tag to compare
  • The authenticate method now takes an optional second argument state, which is returned by verify in your callback:

    -async authenticate(email: string): Promise<string>
    +async authenticate(email: string, state?: string): Promise<string>
  • BREAKING: The verify method now returns (a promise for) an object, so that it can also return the original state from the call to authenticate:

    -async verify(token: string): Promise<string> {
    +async verify(token: string): Promise<{ email: string; state?: string }> {

v0.5.0

10 Nov 14:39
Compare
Choose a tag to compare
  • The minimum Node.js version has been bumped to v18.
  • This package now uses ESM. The PortierClient class is the default export.
    -const { PortierClient } = require("portier");
    +import PortierClient from "portier";
  • RedisStore has been upgrade to the npm redis v4 package (ie. @redis/client v1).
  • The node-fetch dependency has been dropped and replaced by the Node.js built-in fetch API.