@seamless-auth/express 0.0.2-beta.5 → 0.0.2-beta.7
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.d.ts +2 -0
- package/dist/index.js +3 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ interface SeamlessAuthServerOptions {
|
|
|
37
37
|
* ```ts
|
|
38
38
|
* app.use("/auth", createSeamlessAuthServer({
|
|
39
39
|
* authServerUrl: "https://identifier.seamlessauth.com",
|
|
40
|
+
* cookieDomain: "mycompany.com",
|
|
40
41
|
* accesscookieName: "sa_access",
|
|
41
42
|
* registrationCookieName: "sa_registration",
|
|
42
43
|
* refreshCookieName: "sa_refresh",
|
|
@@ -45,6 +46,7 @@ interface SeamlessAuthServerOptions {
|
|
|
45
46
|
*
|
|
46
47
|
* @param opts - Configuration options for the Seamless Auth proxy:
|
|
47
48
|
* - `authServerUrl` — Base URL of your Seamless Auth instance (required)
|
|
49
|
+
* - `cookieDomain` — Domain attribute applied to all auth cookies
|
|
48
50
|
* - `accesscookieName` — Name of the session access cookie
|
|
49
51
|
* - `registrationCookieName` — Name of the ephemeral registration cookie
|
|
50
52
|
* - `refreshCookieName` — Name of the refresh token cookie
|
package/dist/index.js
CHANGED
|
@@ -302,6 +302,8 @@ function createSeamlessAuthServer(opts) {
|
|
|
302
302
|
r.post("/otp/verify-email-otp", proxy("otp/verify-email-otp"));
|
|
303
303
|
r.post("/login", login);
|
|
304
304
|
r.post("/users/update", proxy("users/update"));
|
|
305
|
+
r.post("/users/credentials", proxy("users/credentials"));
|
|
306
|
+
r.delete("/users/credentials", proxy("users/credentials"));
|
|
305
307
|
r.post("/registration/register", register);
|
|
306
308
|
r.get("/users/me", me);
|
|
307
309
|
r.get("/logout", logout);
|
|
@@ -418,7 +420,7 @@ function createSeamlessAuthServer(opts) {
|
|
|
418
420
|
const data = await up.json();
|
|
419
421
|
clearSessionCookie(res, cookieDomain, preAuthCookieName);
|
|
420
422
|
if (!data.user) return res.status(401).json({ error: "unauthenticated" });
|
|
421
|
-
res.json({ user: data.user });
|
|
423
|
+
res.json({ user: data.user, credentials: data.credentials });
|
|
422
424
|
}
|
|
423
425
|
}
|
|
424
426
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamless-auth/express",
|
|
3
|
-
"version": "0.0.2-beta.
|
|
3
|
+
"version": "0.0.2-beta.7",
|
|
4
4
|
"description": "Express adapter for Seamless Auth passwordless authentication",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"author": "Fells Code LLC",
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "tsup src/index.ts --format esm --out-dir dist --splitting",
|
|
11
|
+
"build": "tsup src/index.ts --format esm --out-dir dist --dts --splitting",
|
|
12
12
|
"dev": "tsc --watch"
|
|
13
13
|
},
|
|
14
14
|
"repository": {
|