Skip to content

Commit 04d2d7e

Browse files
committed
Fix formatting (prettier)
1 parent a5d707e commit 04d2d7e

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

.changeset/add-react-readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"@vector-institute/aieng-auth-react": patch
2+
'@vector-institute/aieng-auth-react': patch
33
---
44

55
Add comprehensive README documentation with usage examples, API reference, and best practices

packages/react/README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ Provides authentication context to your application.
122122
```
123123

124124
**Props:**
125+
125126
- `config` (required): Authentication configuration object
126127
- `clientId`: Google OAuth client ID
127128
- `clientSecret`: Google OAuth client secret
@@ -136,19 +137,12 @@ Provides authentication context to your application.
136137
Access authentication state and methods.
137138

138139
```tsx
139-
const {
140-
isAuthenticated,
141-
isLoading,
142-
user,
143-
error,
144-
login,
145-
logout,
146-
handleCallback,
147-
refreshToken,
148-
} = useAuth();
140+
const { isAuthenticated, isLoading, user, error, login, logout, handleCallback, refreshToken } =
141+
useAuth();
149142
```
150143

151144
**Returns:**
145+
152146
- `isAuthenticated`: Boolean indicating if user is authenticated
153147
- `isLoading`: Boolean indicating if authentication is in progress
154148
- `user`: User object with profile information (name, email, picture, etc.)
@@ -167,6 +161,7 @@ const { accessToken, isValid, refresh } = useToken();
167161
```
168162

169163
**Returns:**
164+
170165
- `accessToken`: Current access token (string or null)
171166
- `isValid`: Boolean indicating if the token is valid
172167
- `refresh()`: Function to refresh the token
@@ -185,10 +180,11 @@ import { ProtectedRoute } from '@vector-institute/aieng-auth-react';
185180
<DashboardPage />
186181
</ProtectedRoute>
187182
}
188-
/>
183+
/>;
189184
```
190185

191186
**Props:**
187+
192188
- `children`: React children to render if authenticated
193189
- `redirectTo`: Path to redirect to if not authenticated (default: '/')
194190

@@ -230,7 +226,7 @@ import { SessionStorageAdapter } from '@vector-institute/aieng-auth-core';
230226

231227
<AuthProvider config={authConfig} storage={new SessionStorageAdapter()}>
232228
{children}
233-
</AuthProvider>
229+
</AuthProvider>;
234230
```
235231

236232
## Security Best Practices

0 commit comments

Comments
 (0)