Skip to content

Commit 3730c31

Browse files
committed
add logout loader for remix
1 parent 4d1db6b commit 3730c31

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

.changeset/dirty-trains-attend.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@authdog/remix-node": patch
3+
---
4+
5+
add logout loader for remix

apps/remix/app/routes/logout.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { LoaderFunction } from "@remix-run/node";
2+
import { logoutLoader } from "@authdog/remix-node";
3+
4+
export const loader: LoaderFunction = logoutLoader;

packages/remix/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,4 +234,5 @@ export const remixAuthLoader = async ({
234234
});
235235
};
236236

237-
export { AuthdogProvider } from "./provider.tsx";
237+
export { AuthdogProvider } from "./provider";
238+
export {logoutLoader} from "./logout"

apps/remix/app/routes/logout.tsx renamed to packages/remix/src/logout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { LoaderFunction, redirect } from "@remix-run/node";
22

3-
export const loader: LoaderFunction = async ({ context, request }) => {
3+
export const logoutLoader: LoaderFunction = async ({ context, request }) => {
44
const headers = new Headers();
55

66
const publicKey = process.env.PK_AUTHDOG;

0 commit comments

Comments
 (0)