@mesob/auth-hono 0.3.3 → 0.3.5
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/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1234,7 +1234,11 @@ var checkExistingUserStatus = async ({
|
|
|
1234
1234
|
)
|
|
1235
1235
|
).limit(1);
|
|
1236
1236
|
if (pendingVerification) {
|
|
1237
|
-
return {
|
|
1237
|
+
return {
|
|
1238
|
+
action: "pending",
|
|
1239
|
+
verificationId: pendingVerification.id,
|
|
1240
|
+
user: existingUser
|
|
1241
|
+
};
|
|
1238
1242
|
}
|
|
1239
1243
|
await deleteUnverifiedUser({ tx, userId: existingUser.id, tenantId });
|
|
1240
1244
|
return { action: "proceed" };
|
|
@@ -1839,7 +1843,8 @@ var signUpHandler = async (c) => {
|
|
|
1839
1843
|
if (status.action === "pending") {
|
|
1840
1844
|
return {
|
|
1841
1845
|
type: "pending",
|
|
1842
|
-
verificationId: status.verificationId
|
|
1846
|
+
verificationId: status.verificationId,
|
|
1847
|
+
user: status.user
|
|
1843
1848
|
};
|
|
1844
1849
|
}
|
|
1845
1850
|
const handle = generateHandle();
|
|
@@ -1917,11 +1922,12 @@ var signUpHandler = async (c) => {
|
|
|
1917
1922
|
if (result.type === "pending") {
|
|
1918
1923
|
return c.json(
|
|
1919
1924
|
{
|
|
1920
|
-
|
|
1925
|
+
user: normalizeUser(result.user),
|
|
1926
|
+
session: null,
|
|
1921
1927
|
verificationId: result.verificationId,
|
|
1922
1928
|
requiresVerification: true
|
|
1923
1929
|
},
|
|
1924
|
-
|
|
1930
|
+
201
|
|
1925
1931
|
);
|
|
1926
1932
|
}
|
|
1927
1933
|
if (result.type === "verification") {
|