From bcab903eefe7d6f6601bc410ba9c0fe1b0b30eb9 Mon Sep 17 00:00:00 2001 From: Mike VanDenburgh Date: Fri, 4 Nov 2022 15:39:25 -0400 Subject: [PATCH 1/3] Bump girder-oauth-client to latest version --- web/package.json | 2 +- web/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/package.json b/web/package.json index be3819aa2..68ff057bd 100644 --- a/web/package.json +++ b/web/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@apidevtools/json-schema-ref-parser": "^9.0.7", - "@girder/oauth-client": "^0.7.7", + "@girder/oauth-client": "^0.8.0", "@koumoul/vjsf": "^2.5.2", "@sentry/integrations": "^7.13.0", "@sentry/tracing": "^7.13.0", diff --git a/web/yarn.lock b/web/yarn.lock index a85578c00..70db12c92 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -987,10 +987,10 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@girder/oauth-client@^0.7.7": - version "0.7.8" - resolved "https://registry.yarnpkg.com/@girder/oauth-client/-/oauth-client-0.7.8.tgz#519970a1b3dc867e501e75b1770c088be53110cf" - integrity sha512-ZjniIA4Q1OIO2Ba3suAqClUw6ENUeBiLNTSRJ62fRCPUJDci5VmIb3WvhoELw44x5aR7lbVfCiUmfu3/xL3zGA== +"@girder/oauth-client@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@girder/oauth-client/-/oauth-client-0.8.0.tgz#6bb6c85edd6cf7892c35ff2951076c49809b048c" + integrity sha512-uOEKyerB3BArN/t4UJxA2+L35ykidk60RNN+XwFXlVUVjZMuajaLFB6/r53Tr977/k8D1RJnBjosAfgl7oLTzg== dependencies: "@openid/appauth" "^1.3.0" From 12f658841603bb8a6a7dccdacb97fc1a8ccbb70f Mon Sep 17 00:00:00 2001 From: Mike VanDenburgh Date: Fri, 4 Nov 2022 15:40:13 -0400 Subject: [PATCH 2/3] Update oauth client args due to breaking change in girder-oauth-client --- web/src/rest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/rest.ts b/web/src/rest.ts index 53e581820..23b718153 100644 --- a/web/src/rest.ts +++ b/web/src/rest.ts @@ -24,7 +24,7 @@ let oauthClient: OAuthClient | null = null; try { if (process.env.VUE_APP_OAUTH_API_ROOT && process.env.VUE_APP_OAUTH_CLIENT_ID) { oauthClient = new OAuthClient( - process.env.VUE_APP_OAUTH_API_ROOT, + new URL(process.env.VUE_APP_OAUTH_API_ROOT), process.env.VUE_APP_OAUTH_CLIENT_ID, ); } From 7b3fab0d24d12a40c6649282d380035a2a33d63e Mon Sep 17 00:00:00 2001 From: Mike VanDenburgh Date: Fri, 4 Nov 2022 15:40:51 -0400 Subject: [PATCH 3/3] Always use `window.location.origin` for oauth redirect --- web/src/rest.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/web/src/rest.ts b/web/src/rest.ts index 23b718153..c904c46ad 100644 --- a/web/src/rest.ts +++ b/web/src/rest.ts @@ -26,6 +26,7 @@ try { oauthClient = new OAuthClient( new URL(process.env.VUE_APP_OAUTH_API_ROOT), process.env.VUE_APP_OAUTH_CLIENT_ID, + { redirectUrl: new URL(window.location.origin) }, ); } } catch (e) {