@protobase/client 0.66.8 → 0.66.10
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.
- package/dist/account-security.d.ts +5 -0
- package/dist/account-security.js +11 -0
- package/dist/auth.d.ts +1 -0
- package/dist/static-session.js +1 -0
- package/package.json +3 -3
|
@@ -88,6 +88,11 @@ export declare const accountSecurity: (client: BetterAuthClient) => {
|
|
|
88
88
|
sendConfirmationCode: () => Promise<void>;
|
|
89
89
|
/** Confirms it's them in this session with the emailed code; a few wrong codes end it, and a new one has to be asked for. */
|
|
90
90
|
confirmWithCode: (code: string) => Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Confirms it's them in this session with the account's password, for adding a first passkey to an account without a
|
|
93
|
+
* passkey or a second step. It is no strong sign-in: showing a protected value still asks for one.
|
|
94
|
+
*/
|
|
95
|
+
confirmWithPassword: (password: string) => Promise<void>;
|
|
91
96
|
/** New backup codes for the authenticator app; the old ones stop working. */
|
|
92
97
|
newBackupCodes: (password?: string) => Promise<string[]>;
|
|
93
98
|
};
|
package/dist/account-security.js
CHANGED
|
@@ -139,6 +139,17 @@ const accountSecurity = (client) => ({
|
|
|
139
139
|
});
|
|
140
140
|
if (error) throw authError(error, "The code did not work");
|
|
141
141
|
},
|
|
142
|
+
/**
|
|
143
|
+
* Confirms it's them in this session with the account's password, for adding a first passkey to an account without a
|
|
144
|
+
* passkey or a second step. It is no strong sign-in: showing a protected value still asks for one.
|
|
145
|
+
*/
|
|
146
|
+
confirmWithPassword: async (password) => {
|
|
147
|
+
const { error } = await client.$fetch("/account/confirm-password", {
|
|
148
|
+
method: "POST",
|
|
149
|
+
body: { password }
|
|
150
|
+
});
|
|
151
|
+
if (error) throw authError(error, "The password did not work");
|
|
152
|
+
},
|
|
142
153
|
/** New backup codes for the authenticator app; the old ones stop working. */
|
|
143
154
|
newBackupCodes: async (password) => {
|
|
144
155
|
const { data, error } = await client.twoFactor.generateBackupCodes(password ? { password } : {});
|
package/dist/auth.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export declare const createAuthSession: (options?: AuthSessionOptions) => {
|
|
|
82
82
|
disconnectApp: (clientId: string) => Promise<void>;
|
|
83
83
|
sendConfirmationCode: () => Promise<void>;
|
|
84
84
|
confirmWithCode: (code: string) => Promise<void>;
|
|
85
|
+
confirmWithPassword: (password: string) => Promise<void>;
|
|
85
86
|
newBackupCodes: (password?: string) => Promise<string[]>;
|
|
86
87
|
};
|
|
87
88
|
connect: {
|
package/dist/static-session.js
CHANGED
|
@@ -75,6 +75,7 @@ const createStaticSession = (token, user = {
|
|
|
75
75
|
newBackupCodes: unsupported("make backup codes"),
|
|
76
76
|
sendConfirmationCode: unsupported("email a confirmation code"),
|
|
77
77
|
confirmWithCode: unsupported("confirm with a code"),
|
|
78
|
+
confirmWithPassword: unsupported("confirm with a password"),
|
|
78
79
|
linkedProviders: async () => [],
|
|
79
80
|
linkProvider: unsupported("link a sign-in provider"),
|
|
80
81
|
linkedPersonalMail: async () => [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/client",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.10",
|
|
4
4
|
"description": "Typed fetch client for the Protobase REST API.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@better-auth/passkey": "^1.7.12",
|
|
34
|
-
"@protobase/layout": "0.66.
|
|
35
|
-
"@protobase/schema": "0.66.
|
|
34
|
+
"@protobase/layout": "0.66.10",
|
|
35
|
+
"@protobase/schema": "0.66.10",
|
|
36
36
|
"@simplewebauthn/browser": "^13.3.0",
|
|
37
37
|
"better-auth": "^1.7.12"
|
|
38
38
|
}
|