Skip to content

Commit 50d9584

Browse files
authored
Merge pull request #973 from objectstack-ai/copilot/fix-auth-url-path-error
2 parents f26e15a + 4b075da commit 50d9584

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

apps/console/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ export function App() {
511511
return (
512512
<ThemeProvider defaultTheme="system" storageKey="object-ui-theme">
513513
<ConsoleToaster position="bottom-right" />
514-
<ConditionalAuthWrapper authUrl="/api/auth">
514+
<ConditionalAuthWrapper authUrl="/api/v1/auth">
515515
<PreviewBanner />
516516
<BrowserRouter basename={import.meta.env.BASE_URL?.replace(/\/$/, '') || '/'}>
517517
<Suspense fallback={<LoadingScreen />}>

packages/auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ import { AuthProvider, PreviewBanner } from '@object-ui/auth';
147147
function App() {
148148
return (
149149
<AuthProvider
150-
authUrl="/api/auth"
150+
authUrl="/api/v1/auth"
151151
previewMode={{
152152
simulatedRole: 'admin',
153153
simulatedUserName: 'Demo Admin',

packages/auth/src/AuthProvider.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ export interface AuthProviderProps extends AuthProviderConfig {
3636
*
3737
* @example
3838
* ```tsx
39-
* <AuthProvider authUrl="/api/auth">
39+
* <AuthProvider authUrl="/api/v1/auth">
4040
* <App />
4141
* </AuthProvider>
4242
* ```
4343
*
4444
* @example With disabled auth (development mode)
4545
* ```tsx
46-
* <AuthProvider authUrl="/api/auth" enabled={false}>
46+
* <AuthProvider authUrl="/api/v1/auth" enabled={false}>
4747
* <App />
4848
* </AuthProvider>
4949
* ```
5050
* @example With preview mode (marketplace demo)
5151
* ```tsx
52-
* <AuthProvider authUrl="/api/auth" previewMode={{ simulatedRole: 'admin', bannerMessage: 'Demo mode' }}>
52+
* <AuthProvider authUrl="/api/v1/auth" previewMode={{ simulatedRole: 'admin', bannerMessage: 'Demo mode' }}>
5353
* <App />
5454
* </AuthProvider>
5555
* ```

packages/auth/src/createAuthClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import type { AuthClient, AuthClientConfig, AuthUser, AuthSession, SignInCredent
1717
*
1818
* @example
1919
* ```ts
20-
* const authClient = createAuthClient({ baseURL: '/api/auth' });
20+
* const authClient = createAuthClient({ baseURL: '/api/v1/auth' });
2121
* const { user, session } = await authClient.signIn({ email, password });
2222
* ```
2323
*/

packages/auth/src/createAuthenticatedFetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface AuthenticatedAdapterOptions {
3232
* import { ObjectStackAdapter } from '@object-ui/data-objectstack';
3333
* import { createAuthClient, createAuthenticatedFetch } from '@object-ui/auth';
3434
*
35-
* const authClient = createAuthClient({ baseURL: '/api/auth' });
35+
* const authClient = createAuthClient({ baseURL: '/api/v1/auth' });
3636
* const authenticatedFetch = createAuthenticatedFetch(authClient);
3737
*
3838
* const adapter = new ObjectStackAdapter({

packages/auth/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export interface SignUpData {
8686

8787
/** Auth client configuration */
8888
export interface AuthClientConfig {
89-
/** Authentication server URL (e.g., "/api/auth") */
89+
/** Authentication server URL (e.g., "/api/v1/auth") */
9090
baseURL: string;
9191
/** Custom fetch function for requests */
9292
fetchFn?: typeof fetch;

0 commit comments

Comments
 (0)