@@ -91,15 +91,17 @@ For pages where you want to display a signed-in and signed-out view, use `authki
91
91
92
92
``` tsx
93
93
import type { ActionFunctionArgs , LoaderFunctionArgs } from ' @remix-run/node' ;
94
- import { Link , useLoaderData , json , Form } from ' @remix-run/react' ;
94
+ import { json } from ' @remix-run/node' ;
95
+ import { Form , Link , useLoaderData } from ' @remix-run/react' ;
95
96
import { getSignInUrl , getSignUpUrl , signOut , authkitLoader } from ' @workos-inc/authkit-remix' ;
96
97
97
- export const loader = (args : LoaderFunctionArgs ) => authkitLoader (args , async ({ request , auth }) => {
98
- return json ({
99
- signInUrl: await getSignInUrl ();
100
- signUpUrl : await getSignUpUrl ();
98
+ export const loader = (args : LoaderFunctionArgs ) =>
99
+ authkitLoader (args , async ({ request , auth }) => {
100
+ return json ({
101
+ signInUrl: await getSignInUrl (),
102
+ signUpUrl: await getSignUpUrl (),
103
+ });
101
104
});
102
- });
103
105
104
106
export async function action({ request }: ActionFunctionArgs ) {
105
107
return await signOut (request );
@@ -148,7 +150,8 @@ Use the `signOut` method to sign out the current logged in user, end the session
148
150
Sometimes it is useful to obtain the access token directly, for instance to make API requests to another service.
149
151
150
152
``` tsx
151
- import type { LoaderFunctionArgs , json } from ' @remix-run/node' ;
153
+ import type { LoaderFunctionArgs } from ' @remix-run/node' ;
154
+ import { json } from ' @remix-run/node' ;
152
155
import { withAuth } from ' @workos-inc/authkit-remix' ;
153
156
154
157
export const loader = (args : LoaderFunctionArgs ) =>
0 commit comments