@quatrain/auth-supabase 1.1.14 → 1.1.15
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.
|
@@ -8,7 +8,7 @@ export declare class SupabaseAuthAdapter extends AbstractAuthAdapter {
|
|
|
8
8
|
* @param user
|
|
9
9
|
* @returns user unique id
|
|
10
10
|
*/
|
|
11
|
-
register(user: User): Promise<any>;
|
|
11
|
+
register(user: User, clearPassword?: string): Promise<any>;
|
|
12
12
|
getAuthToken(bearer: string): Promise<any>;
|
|
13
13
|
refreshToken(refreshToken: string): Promise<any>;
|
|
14
14
|
revokeAuthToken(token: string): Promise<void>;
|
|
@@ -52,14 +52,14 @@ class SupabaseAuthAdapter extends auth_1.AbstractAuthAdapter {
|
|
|
52
52
|
* @param user
|
|
53
53
|
* @returns user unique id
|
|
54
54
|
*/
|
|
55
|
-
register(user) {
|
|
55
|
+
register(user, clearPassword) {
|
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
57
|
try {
|
|
58
58
|
const { name: displayName, email, phone: phoneNumber, password, } = user._;
|
|
59
59
|
auth_1.Auth.info(`[SAA] Adding user '${displayName}'`);
|
|
60
60
|
const { data, error } = yield this._client.auth.admin.createUser({
|
|
61
61
|
email,
|
|
62
|
-
password,
|
|
62
|
+
password: clearPassword || password,
|
|
63
63
|
email_confirm: true, // TODO move to params
|
|
64
64
|
});
|
|
65
65
|
if (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quatrain/auth-supabase",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"author": "Quatrain Développement SAS <developers@quatrain.com>",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@quatrain/auth": "^1.1.
|
|
14
|
-
"@supabase/supabase-js": "^2.
|
|
13
|
+
"@quatrain/auth": "^1.1.17",
|
|
14
|
+
"@supabase/supabase-js": "^2.49.4",
|
|
15
15
|
"node-fetch-native": "^1.6.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|