diff --git a/package.json b/package.json index a4906f4..52e6d27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "api-explorer", - "version": "1.0.17", + "version": "1.0.18", "private": true, "scripts": { "dev": "vite & ts-node server/app.ts", diff --git a/server/controllers/UserController.ts b/server/controllers/UserController.ts index ca46e9c..98b6db3 100644 --- a/server/controllers/UserController.ts +++ b/server/controllers/UserController.ts @@ -49,6 +49,9 @@ export class UserController { this.oauthInjectedService.requestTokenKey = undefined this.oauthInjectedService.requestTokenSecret = undefined session['clientConfig'] = undefined + if(!this.obpExplorerHome) { + console.error(`VITE_OBP_API_EXPLORER_HOST: ${this.obpExplorerHome}`) + } response.redirect(this.obpExplorerHome) return response } diff --git a/server/middlewares/OauthAccessTokenMiddleware.ts b/server/middlewares/OauthAccessTokenMiddleware.ts index de331fb..c92c658 100644 --- a/server/middlewares/OauthAccessTokenMiddleware.ts +++ b/server/middlewares/OauthAccessTokenMiddleware.ts @@ -63,7 +63,11 @@ export default class OauthAccessTokenMiddleware implements ExpressMiddlewareInte } session['clientConfig'] = clientConfig console.log('OauthAccessTokenMiddleware.ts use says: Seems OK, redirecting..') - response.redirect(`${process.env.VITE_OBP_API_EXPLORER_HOST}`) + const obpExplorerHome = process.env.VITE_OBP_API_EXPLORER_HOST + if(!obpExplorerHome) { + console.error(`VITE_OBP_API_EXPLORER_HOST: ${obpExplorerHome}`) + } + response.redirect(`${obpExplorerHome}`) } } )