@sqrzro/auth 2.0.0-bz.1 → 2.0.0-bz.2

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @sqrzro/auth@2.0.0-bz.0 build /Users/richard/Sites/@sqrzro/sqrzro/packages/auth
2
+ > @sqrzro/auth@2.0.0-bz.2 build /Users/richard/Sites/@sqrzro/sqrzro/packages/auth
3
3
  > tsc -p tsconfig.json
4
4
 
@@ -0,0 +1,32 @@
1
+
2
+ > @sqrzro/auth@2.0.0-bz.1 dev /Users/richard/Sites/@sqrzro/sqrzro/packages/auth
3
+ > tsc -p tsconfig.json --watch
4
+
5
+ c[7:55:29 AM] Starting compilation in watch mode...
6
+
7
+ [7:55:31 AM] Found 0 errors. Watching for file changes.
8
+
9
+ c[7:55:34 AM] File change detected. Starting incremental compilation...
10
+
11
+ [7:55:34 AM] Found 0 errors. Watching for file changes.
12
+
13
+ c[7:55:38 AM] File change detected. Starting incremental compilation...
14
+
15
+ [7:55:38 AM] Found 0 errors. Watching for file changes.
16
+
17
+ c[11:04:28 AM] File change detected. Starting incremental compilation...
18
+
19
+ [11:04:28 AM] Found 0 errors. Watching for file changes.
20
+
21
+ c[11:04:35 AM] File change detected. Starting incremental compilation...
22
+
23
+ [11:04:35 AM] Found 0 errors. Watching for file changes.
24
+
25
+ c[11:04:43 AM] File change detected. Starting incremental compilation...
26
+
27
+ [11:04:43 AM] Found 0 errors. Watching for file changes.
28
+
29
+ c[11:04:52 AM] File change detected. Starting incremental compilation...
30
+
31
+ [11:04:52 AM] Found 0 errors. Watching for file changes.
32
+
@@ -38,7 +38,7 @@ async function Auth({ classNames, logo, onLogin, onPassword, params: { auth }, s
38
38
  return notFound();
39
39
  }
40
40
  await registerAuthEvents({ login: onLogin, password: onPassword });
41
- return (_jsxs("div", { className: tw('grid h-screen grid-rows-[1fr_auto_auto_2fr] justify-center', classNames?.root), children: [_jsx("div", { className: tw('row-start-2', classNames?.logo), children: logo }), _jsx("div", { className: tw('row-start-3 w-screen max-w-sm', classNames?.panel), children: getPage(auth[0], {
41
+ return (_jsxs("div", { className: tw(classNames?.root), children: [_jsx("div", { className: tw(classNames?.logo), children: logo }), _jsx("div", { className: tw(classNames?.panel), children: getPage(auth[0], {
42
42
  classNames,
43
43
  searchParams,
44
44
  }) })] }));
@@ -7,6 +7,8 @@ function LogoutButton({ children = 'Log out', redirectTo, }) {
7
7
  async function handleLogout() {
8
8
  await logout();
9
9
  router.push(redirectTo || '/');
10
+ // It seems necessary to refresh to ensure the user is redirected to the login page
11
+ router.refresh();
10
12
  }
11
13
  return (_jsx("form", { action: handleLogout, className: "contents", children: _jsx("button", { type: "submit", children: children }) }));
12
14
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sqrzro/auth",
3
3
  "type": "module",
4
- "version": "2.0.0-bz.1",
4
+ "version": "2.0.0-bz.2",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "dependencies": {
@@ -17,6 +17,7 @@
17
17
  "typescript": "^5.4.4"
18
18
  },
19
19
  "scripts": {
20
- "build": "tsc -p tsconfig.json"
20
+ "build": "tsc -p tsconfig.json",
21
+ "dev": "tsc -p tsconfig.json --watch"
21
22
  }
22
23
  }
@@ -18,6 +18,9 @@ function LogoutButton({
18
18
  async function handleLogout(): Promise<void> {
19
19
  await logout();
20
20
  router.push(redirectTo || '/');
21
+
22
+ // It seems necessary to refresh to ensure the user is redirected to the login page
23
+ router.refresh();
21
24
  }
22
25
 
23
26
  return (