From 859aee5939ca0b1a8f70b8ebad5a2ed7496bb060 Mon Sep 17 00:00:00 2001 From: Alan Bridgeman Date: Fri, 20 Feb 2026 22:41:35 -0600 Subject: [PATCH] Updated dependency and made mostly naming changes --- package.json | 2 +- src/oauth/OAuthApp.ts | 9 +++++---- yarn.lock | 18 +++++++++--------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 0469f05..f73cce6 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "create-ba-web-app": "node ./bin/create-project.js" }, "dependencies": { - "@BridgemanAccessible/ba-auth": "^1.0.36", + "@BridgemanAccessible/ba-auth": "^1.0.37", "@BridgemanAccessible/ba-logging": "^1.0.1", "express": "^4.19.2", "fs-extra": "^11.2.0", diff --git a/src/oauth/OAuthApp.ts b/src/oauth/OAuthApp.ts index 4fa2fb0..037b7cf 100644 --- a/src/oauth/OAuthApp.ts +++ b/src/oauth/OAuthApp.ts @@ -103,7 +103,7 @@ type OAuthAppOptions = T & BasicOAuthApp export class OAuthApp extends App { private onAuth: OnAuthCallback; private saveSecret: (secret: string) => void | Promise; - private getAccessToken: () => Promise; + private getSecret: () => Promise; private options: OAuthAppOptions; @@ -134,6 +134,7 @@ export class OAuthApp extend * * @param onAuth The callback to call when a user logs in * @param saveSecret The callback to call to save the secret + * @param getSecret The callback to call to get the secret * @param options The options for the OAuth app * @param options.baseAppUrl The base URL of the app * @param options.client_abbreviation The abbreviation of the app (used for user properties associated with the app) @@ -156,13 +157,13 @@ export class OAuthApp extend constructor( onAuth: OnAuthCallback, saveSecret: (secret: string) => void | Promise, - getAccessToken: () => Promise, + getSecret: () => Promise, options?: OAuthAppOptions ) { super(); this.onAuth = onAuth; this.saveSecret = saveSecret; - this.getAccessToken = getAccessToken; + this.getSecret = getSecret; this.options = options ?? {} as OAuthAppOptions; } @@ -204,7 +205,7 @@ export class OAuthApp extend baseAppUrl, this.onAuth, this.saveSecret, - this.getAccessToken, + this.getSecret, { client_abbreviation: appAbbrv, subscription_required: this.options.subscription_required ?? false, diff --git a/yarn.lock b/yarn.lock index e60ae3c..d54c8ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,12 +2,12 @@ # yarn lockfile v1 -"@BridgemanAccessible/ba-auth@^1.0.36": - version "1.0.36" - resolved "https://npm.pkg.bridgemanaccessible.ca/@BridgemanAccessible/ba-auth/-/ba-auth-1.0.36.tgz#7654d37d3e078cd0c3b226d05b15e873437133b5" - integrity sha512-9e1OYDhUhkl38FmL2wMhPjfqsy2Pt/+o0WQtHne2cPMDAoz4h0cat9NE3lGDnCn1LMkUXaCXvNXoRUDJkUpFJw== +"@BridgemanAccessible/ba-auth@^1.0.37": + version "1.0.37" + resolved "https://npm.pkg.bridgemanaccessible.ca/@BridgemanAccessible/ba-auth/-/ba-auth-1.0.37.tgz#70c6d56fbe2f6111ead234fe40c79acea342ae51" + integrity sha512-YRiC5MUV+fsYaTPWnGnPuHgfJ5juYvWrqyTVdtgVM2iIbqSCSTQsLrLdjDdnRn5vFRDHDv6ypJuTu6crxcDJCQ== dependencies: - "@BridgemanAccessible/ba-auth_adapters" "^1.0.1" + "@BridgemanAccessible/ba-auth_adapters" "^1.0.2" "@BridgemanAccessible/ba-auth_keystore" "^1.0.1" "@BridgemanAccessible/ba-logging" "^1.0.1" argon2 "^0.40.1" @@ -19,10 +19,10 @@ psl "^1.15.0" uuid "^9.0.1" -"@BridgemanAccessible/ba-auth_adapters@^1.0.1": - version "1.0.1" - resolved "https://npm.pkg.bridgemanaccessible.ca/@BridgemanAccessible/ba-auth_adapters/-/ba-auth_adapters-1.0.1.tgz#ba5a4bcc7e2a8a22a539165140b1900e618db535" - integrity sha512-RigrC3wbDB+MICgLyHpyunrVXUa6NpT14jVk01DYZPIXgbLURfTJhhNB8Xm8AP5/t3onMBvGoz3hNNON6jxOqQ== +"@BridgemanAccessible/ba-auth_adapters@^1.0.2": + version "1.0.2" + resolved "https://npm.pkg.bridgemanaccessible.ca/@BridgemanAccessible/ba-auth_adapters/-/ba-auth_adapters-1.0.2.tgz#a546759a8bc0f2d0eb1a211b144870f8414a3dd9" + integrity sha512-k8pzWTJUGdPEPtSZilTHDTydre/O0yM8YaNlXdq4cCRaIPJHc6Hyn94wZWNPd2nZsnUsvLj7gXWPaHphY8E1Ug== dependencies: "@BridgemanAccessible/ba-logging" "^1.0.1" express "^5.2.1"