From 89b4951770fa78931ca87d11dee574fff5a6d92f Mon Sep 17 00:00:00 2001 From: Jia Hao Woo Date: Fri, 25 Oct 2024 11:35:18 +0100 Subject: [PATCH 1/3] hi --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 719812f68..d5bc55d7c 100644 --- a/README.md +++ b/README.md @@ -24,3 +24,4 @@ > Full docs on the `changesets` tool can be found at the [changesets/changesets github repo](https://github.com/changesets/changesets). 7. If you're curious what the final build output might look like you can run `pnpm build` from root. 8. Run all lint rules and tests with `pnpm check` from root. +hi From 62c13abf139d8ed8644b8e60164f40dc4b5d15c9 Mon Sep 17 00:00:00 2001 From: Jia Hao Woo Date: Mon, 4 Nov 2024 13:41:29 +0000 Subject: [PATCH 2/3] Replace api:X-data with api:ontologies-X --- packages/cli.common/src/commands/auth/login/loginFlow.ts | 5 ++++- packages/e2e.sandbox.oauth.public.react-router/src/client.ts | 2 +- packages/oauth/src/createConfidentialOauthClient.ts | 2 +- packages/oauth/src/createPublicOauthClient.ts | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/cli.common/src/commands/auth/login/loginFlow.ts b/packages/cli.common/src/commands/auth/login/loginFlow.ts index 0a96769d5..8ba73feb6 100644 --- a/packages/cli.common/src/commands/auth/login/loginFlow.ts +++ b/packages/cli.common/src/commands/auth/login/loginFlow.ts @@ -156,7 +156,10 @@ function generateAuthorizeUrl( "code_challenge_method", codeChallenge.codeChallengeMethod, ); - queryParams.append("scope", ["offline_access", "api:read-data"].join(" ")); + queryParams.append( + "scope", + ["offline_access", "api:ontologies-read"].join(" "), + ); return join(baseUrl, "multipass", "api", "oauth2", "authorize") + `?` + queryParams.toString(); diff --git a/packages/e2e.sandbox.oauth.public.react-router/src/client.ts b/packages/e2e.sandbox.oauth.public.react-router/src/client.ts index d77b2bd6a..e65c4d23e 100644 --- a/packages/e2e.sandbox.oauth.public.react-router/src/client.ts +++ b/packages/e2e.sandbox.oauth.public.react-router/src/client.ts @@ -34,7 +34,7 @@ export const publicOauthClient = createPublicOauthClient( // where to redirect after login, defaults to "page before redirect" /* post login page */ undefined, // - // Scopes to use, defaults to: ["api:read-data", "api:write-data"], + // Scopes to use, defaults to: ["api:ontologies-read", "api:ontologies-write"], /* scopes */ undefined, ); diff --git a/packages/oauth/src/createConfidentialOauthClient.ts b/packages/oauth/src/createConfidentialOauthClient.ts index 83196f218..85cbc7f52 100644 --- a/packages/oauth/src/createConfidentialOauthClient.ts +++ b/packages/oauth/src/createConfidentialOauthClient.ts @@ -37,7 +37,7 @@ export function createConfidentialOauthClient( client_id: string, client_secret: string, url: string, - scopes: string[] = ["api:read-data", "api:write-data"], + scopes: string[] = ["api:ontologies-read", "api:ontologies-write"], fetchFn: typeof globalThis.fetch = globalThis.fetch, ctxPath: string = "/multipass", ): ConfidentialOauthClient { diff --git a/packages/oauth/src/createPublicOauthClient.ts b/packages/oauth/src/createPublicOauthClient.ts index f28b72f04..1c9e19291 100644 --- a/packages/oauth/src/createPublicOauthClient.ts +++ b/packages/oauth/src/createPublicOauthClient.ts @@ -71,7 +71,7 @@ export function createPublicOauthClient( const oauthHttpOptions: HttpRequestOptions = { [customFetch]: fetchFn }; if (scopes.length === 0) { - scopes = ["api:read-data", "api:write-data"]; + scopes = ["api:ontologies-read", "api:ontologies-write"]; } const { makeTokenAndSaveRefresh, getToken } = common( From a3179912e65f509aa02629e08600a933f9c63d48 Mon Sep 17 00:00:00 2001 From: Jia Hao Woo Date: Mon, 4 Nov 2024 13:43:40 +0000 Subject: [PATCH 3/3] Remove hi --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index d5bc55d7c..f4c2cda11 100644 --- a/README.md +++ b/README.md @@ -23,5 +23,4 @@ > > Full docs on the `changesets` tool can be found at the [changesets/changesets github repo](https://github.com/changesets/changesets). 7. If you're curious what the final build output might look like you can run `pnpm build` from root. -8. Run all lint rules and tests with `pnpm check` from root. -hi +8. Run all lint rules and tests with `pnpm check` from root. \ No newline at end of file