Skip to content
This repository has been archived by the owner on May 30, 2021. It is now read-only.

Releases: RodolfoSilva/hasura-auth

v0.3.1

24 Jul 14:48
0bee9a2
Compare
Choose a tag to compare
Merge pull request #22 from RodolfoSilva/hotfix/add-async-check

fix: allow async check

v0.3.0

24 Jul 14:23
02e9493
Compare
Choose a tag to compare
Merge pull request #21 from RodolfoSilva/feature/add-option-to-customโ€ฆ

V0.2.1

18 Sep 00:16
Compare
Choose a tag to compare

Update yarn.lock

Breaking changes

  • auth_refresh_token now expect only refresh_token as parameter
  • x-refresh-token is deprecated

V0.2.0

14 Sep 15:51
8e8bb2e
Compare
Choose a tag to compare

Data migration:

CREATE TABLE "organization" (
  id uuid DEFAULT gen_random_uuid() NOT NULL CONSTRAINT organization_pkey PRIMARY KEY,
  name text NOT NULL,
  created_at timestamp WITH TIME ZONE DEFAULT now() NOT NULL,
  updated_at timestamp WITH TIME ZONE DEFAULT now() NOT NULL
);

ALTER TABLE "user" ADD COLUMN organization_id uuid NULL CONSTRAINT user_organization_id_fkey REFERENCES "organization" ON UPDATE CASCADE ON DELETE CASCADE;

ALTER TABLE "user" ADD CONSTRAINT user_email_organization_id_key UNIQUE (email, organization_id);

ALTER TABLE "user" DROP CONSTRAINT user_email_key;

Breaking changes:

Now the mutations auth_register, auth_change_password, and auth_activate_account returns an object instead a boolean value.

{
  "affected_rows": 0 | 1
}

Now the mutations auth_login and refresh_token response return all fields in lower case with words separeted with underline:

{
  "access_token": String!,
  "refresh_token": String!,
  "user_id": ID!,
  "organization_id": String
}

A new optional parameter has ban added in auth_login, auth_register, and auth_activate_account. You can specify which organization do you want use, by default is null.

V0.1.1

13 Sep 03:59
Compare
Choose a tag to compare

Bug fix:

  • omit x-hasura-allowed-roles from hook response
  • omit x-hasura-default-role from hook response

V0.1.0

12 Sep 02:06
fb9d014
Compare
Choose a tag to compare

Breaking Changes:

Update your database tables

CREATE TABLE "role" (
  name text NOT NULL PRIMARY KEY,
  created_at timestamp with time zone NOT NULL DEFAULT now()
);

CREATE TABLE "user_role" (
  id uuid DEFAULT gen_random_uuid() NOT NULL CONSTRAINT user_role_pkey PRIMARY KEY,
  user_id uuid NOT NULL CONSTRAINT user_role_user_id_fkey REFERENCES "user" ON UPDATE CASCADE ON DELETE CASCADE,
  role text NOT NULL,
  created_at timestamp WITH TIME ZONE DEFAULT now() NOT NULL,
  updated_at timestamp WITH TIME ZONE DEFAULT now() NOT NULL,
  CONSTRAINT user_role_user_id_role_key UNIQUE (user_id, role)
);

INSERT INTO "role" ("name") VALUES ('user');

ALTER TABLE "user" RENAME COLUMN "role" TO "default_role";

0.0.5

20 Apr 00:11
Compare
Choose a tag to compare
v0.0.5