@quatrain/auth-supabase 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,4 +14,5 @@ export declare class SupabaseAuthAdapter extends AbstractAuthAdapter {
14
14
  signout(user: User): Promise<any>;
15
15
  update(user: User, updatable: any): Promise<any>;
16
16
  delete(user: User): Promise<any>;
17
+ setCustomUserClaims(id: string, claims: any): Promise<any>;
17
18
  }
@@ -75,5 +75,16 @@ class SupabaseAuthAdapter extends auth_1.AbstractAuthAdapter {
75
75
  // return await getAuth().deleteUser(user.uid)
76
76
  });
77
77
  }
78
+ setCustomUserClaims(id, claims) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ const { data, error } = yield this._client.auth.updateUserById(id, claims);
81
+ if (error) {
82
+ throw new Error(error);
83
+ }
84
+ else {
85
+ return data;
86
+ }
87
+ });
88
+ }
78
89
  }
79
90
  exports.SupabaseAuthAdapter = SupabaseAuthAdapter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/auth-supabase",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",