@proveanything/smartlinks-auth-ui 0.4.9 → 0.4.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/api.d.ts +1 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/components/SmartlinksAuthUI.d.ts.map +1 -1
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11336,10 +11336,11 @@ class AuthAPI {
|
|
|
11336
11336
|
throw err;
|
|
11337
11337
|
}
|
|
11338
11338
|
}
|
|
11339
|
-
async sendMagicLink(email, redirectUrl) {
|
|
11339
|
+
async sendMagicLink(email, redirectUrl, displayName) {
|
|
11340
11340
|
return smartlinks__namespace.authKit.sendMagicLink(this.clientId, {
|
|
11341
11341
|
email,
|
|
11342
|
-
redirectUrl
|
|
11342
|
+
redirectUrl,
|
|
11343
|
+
accountData: displayName ? { displayName } : undefined,
|
|
11343
11344
|
});
|
|
11344
11345
|
}
|
|
11345
11346
|
async verifyMagicLink(token) {
|
|
@@ -14035,9 +14036,8 @@ const SmartlinksAuthUI = ({ apiEndpoint, clientId, clientName, accountData, onAu
|
|
|
14035
14036
|
setLoading(true);
|
|
14036
14037
|
setError(undefined);
|
|
14037
14038
|
try {
|
|
14038
|
-
//
|
|
14039
|
-
await api.
|
|
14040
|
-
await api.sendMagicLink(email, getRedirectUrl());
|
|
14039
|
+
// Send magic link - backend handles account creation automatically on verify
|
|
14040
|
+
await api.sendMagicLink(email, getRedirectUrl(), displayName);
|
|
14041
14041
|
setAuthSuccess(true);
|
|
14042
14042
|
setSuccessMessage('Magic link sent! Check your email to log in.');
|
|
14043
14043
|
}
|