@mspkapps/auth-client 0.1.19 → 0.1.21
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/package.json +1 -1
- package/src/AuthClient.js +2 -2
package/package.json
CHANGED
package/src/AuthClient.js
CHANGED
|
@@ -67,11 +67,11 @@ export class AuthClient {
|
|
|
67
67
|
logout() { this.setToken(null); }
|
|
68
68
|
|
|
69
69
|
// ---------- public API methods ----------
|
|
70
|
-
async register({ email, username, password, name }) {
|
|
70
|
+
async register({ email, username, password, name, extra = {} }) {
|
|
71
71
|
const resp = await this.fetch(this._buildUrl('auth/register'), {
|
|
72
72
|
method: 'POST',
|
|
73
73
|
headers: this._headers(),
|
|
74
|
-
body: JSON.stringify({ email, username, password, name })
|
|
74
|
+
body: JSON.stringify({ email, username, password, name, ...extra })
|
|
75
75
|
});
|
|
76
76
|
const json = await safeJson(resp);
|
|
77
77
|
if (!resp.ok || json?.success === false) throw toError(resp, json, 'Register failed');
|