Skip to content
13 changes: 13 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"permissions": {
"allow": [
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(npm run lint:*)",
"Bash(npx tsc:*)",
"Bash(grep:*)",
"Bash(mv:*)"
],
"deny": []
}
}
15 changes: 15 additions & 0 deletions src/app/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import {
OrcidLinkError,
} from '../features/account/OrcidLink';
import { ManageTokens } from '../features/account/ManageTokens';
import { Orgs, OrganizationDetail, CreateOrganization } from '../features/orgs';

export const LOGIN_ROUTE = '/login';
export const SIGNUP_ROUTE = '/signup';
Expand Down Expand Up @@ -144,6 +145,20 @@ const Routes: FC = () => {
<Route path="*" element={<PageNotFound />} />
</Route>

{/* Organizations */}
<Route path="/orgs">
<Route index element={<Authed element={<Orgs />} />} />
<Route
path="new"
element={<Authed element={<CreateOrganization />} />}
/>
<Route
path=":orgId"
element={<Authed element={<OrganizationDetail />} />}
/>
<Route path="*" element={<PageNotFound />} />
</Route>

{/* CDM */}
<Route path="/cdm">
<Route path="redirect" element={<Authed element={<CDMRedirect />} />} />
Expand Down
9 changes: 2 additions & 7 deletions src/common/api/authService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@ import { uriEncodeTemplateTag as encode } from '../utils/stringUtils';
import { baseApi } from './index';
import { httpService } from './utils/serviceHelpers';

const loginOrigin =
process.env.NODE_ENV === 'development'
? 'https://ci.kbase.us'
: document.location.origin;

// In prod, the canonical auth domain is kbase.us, not narrative.kbase.us
// navigating instead to narrative.kbase.us will set the internal cookie
// on the wrong domain.
const authOrigin =
loginOrigin === 'https://narrative.kbase.us'
document.location.origin === 'https://narrative.kbase.us'
? 'https://kbase.us'
: loginOrigin;
: document.location.origin;

const authService = httpService({
url: '/services/auth',
Expand Down
Loading
Loading