Skip to content

Commit f5cb927

Browse files
committed
run prettier on everything
1 parent 551478a commit f5cb927

File tree

7 files changed

+32
-28
lines changed

7 files changed

+32
-28
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/setup-node@v4
2121
with:
2222
node-version: 18
23-
registry-url: 'https://registry.npmjs.org'
23+
registry-url: "https://registry.npmjs.org"
2424

2525
- name: Install Dependencies
2626
run: |

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,30 +91,30 @@ function App() {
9191
Your app should be wrapped in the `AuthKitProvider` component. This component
9292
takes the following props:
9393
94-
* `clientId` (required): Your `WORKOS_CLIENT_ID`
95-
* `apiHostname`: Defaults to `api.workos.com`. This should be set to your custom Authentication API domain in production.
96-
* `redirectUri`: The url that WorkOS will redirect to upon successful authentication. (Used when constructing sign-in/sign-up URLs).
97-
* `devMode`: Defaults to `true` if window.location is "localhost" or "127.0.0.1". Tokens will be stored in localStorage when this prop is true.
98-
* `onRedirectCallback`: Called after exchanging the
94+
- `clientId` (required): Your `WORKOS_CLIENT_ID`
95+
- `apiHostname`: Defaults to `api.workos.com`. This should be set to your custom Authentication API domain in production.
96+
- `redirectUri`: The url that WorkOS will redirect to upon successful authentication. (Used when constructing sign-in/sign-up URLs).
97+
- `devMode`: Defaults to `true` if window.location is "localhost" or "127.0.0.1". Tokens will be stored in localStorage when this prop is true.
98+
- `onRedirectCallback`: Called after exchanging the
9999
`authorization_code`. Can be used for things like redirecting to a "return
100100
to" path in the OAuth state.
101101
102102
### `useAuth`
103103
104104
The `useAuth` hook returns user information and helper functions:
105105
106-
* `isLoading`: true while user information is being obtained from fetch during initial load.
107-
* `user`: The WorkOS `User` object for this session.
108-
* `getAccessToken`: Returns an access token. Will fetch a fresh access token if necessary.
109-
* `signIn`: Redirects the user to the Hosted AuthKit sign-in page. Takes an optional `state` argument.
110-
* `signUp`: Redirects the user to the Hosted AuthKit sign-up page. Takes an optional `state` argument.
111-
* `signOut`: Ends the session.
106+
- `isLoading`: true while user information is being obtained from fetch during initial load.
107+
- `user`: The WorkOS `User` object for this session.
108+
- `getAccessToken`: Returns an access token. Will fetch a fresh access token if necessary.
109+
- `signIn`: Redirects the user to the Hosted AuthKit sign-in page. Takes an optional `state` argument.
110+
- `signUp`: Redirects the user to the Hosted AuthKit sign-up page. Takes an optional `state` argument.
111+
- `signOut`: Ends the session.
112112
113113
The following claims may be populated if the user is part of an organization:
114114
115-
* `organizationId`: The currently-selected organization.
116-
* `role`: The `role` of the user for the current organization.
117-
* `permissions`: Permissions corresponding to this role.
115+
- `organizationId`: The currently-selected organization.
116+
- `role`: The `role` of the user for the current organization.
117+
- `permissions`: Permissions corresponding to this role.
118118
119119
## Impersonation
120120

src/context.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
'use client';
1+
"use client";
22

3-
import * as React from 'react';
4-
import { Client } from './types';
5-
import { State, initialState } from './state';
3+
import * as React from "react";
4+
import { Client } from "./types";
5+
import { State, initialState } from "./state";
66

77
export interface ContextValue extends Client, State {}
88

9-
export const Context = React.createContext<ContextValue>(initialState as ContextValue);
9+
export const Context = React.createContext<ContextValue>(
10+
initialState as ContextValue,
11+
);

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export { useAuth } from './hook';
2-
export { AuthKitProvider } from './provider';
3-
export { getClaims } from '@workos-inc/authkit-js';
1+
export { useAuth } from "./hook";
2+
export { AuthKitProvider } from "./provider";
3+
export { getClaims } from "@workos-inc/authkit-js";

src/provider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function AuthKitProvider(props: AuthKitProviderProps) {
4444
return isEquivalentWorkOSSession(prev, next) ? prev : next;
4545
});
4646
},
47-
[client]
47+
[client],
4848
);
4949

5050
React.useEffect(() => {
@@ -86,7 +86,7 @@ export function AuthKitProvider(props: AuthKitProviderProps) {
8686
// poor-man's "deep equality" check
8787
function isEquivalentWorkOSSession(
8888
a: typeof initialState,
89-
b: typeof initialState
89+
b: typeof initialState,
9090
) {
9191
return (
9292
a.user?.updatedAt === b.user?.updatedAt &&

src/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { User } from '@workos-inc/authkit-js';
1+
import { User } from "@workos-inc/authkit-js";
22

33
export interface State {
44
isLoading: boolean;

src/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { createClient } from '@workos-inc/authkit-js';
1+
import { createClient } from "@workos-inc/authkit-js";
22

33
export type Client = Awaited<ReturnType<typeof createClient>>;
4-
export type CreateClientOptions = NonNullable<Parameters<typeof createClient>[1]>;
4+
export type CreateClientOptions = NonNullable<
5+
Parameters<typeof createClient>[1]
6+
>;

0 commit comments

Comments
 (0)