From 5e8a1800374851f7e183f469fb815e67ab176c50 Mon Sep 17 00:00:00 2001 From: Stefan Aebischer Date: Fri, 6 Dec 2019 18:33:39 -0500 Subject: [PATCH] Add port configuration to example --- flow.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flow.ts b/flow.ts index c277b75..a259dd7 100644 --- a/flow.ts +++ b/flow.ts @@ -55,9 +55,10 @@ const requestor = new NodeRequestor(); const openIdConnectUrl = "https://accounts.google.com"; /* example client configuration */ +const PORT = 8000; const clientId = "511828570984-7nmej36h9j2tebiqmpqh835naet4vci4.apps.googleusercontent.com"; -const redirectUri = "http://127.0.0.1:8000"; +const redirectUri = `http://127.0.0.1:${PORT}`; const scope = "openid"; export class AuthFlow { @@ -75,7 +76,7 @@ export class AuthFlow { constructor() { this.notifier = new AuthorizationNotifier(); this.authStateEmitter = new AuthStateEmitter(); - this.authorizationHandler = new NodeBasedHandler(); + this.authorizationHandler = new NodeBasedHandler(PORT); this.tokenHandler = new BaseTokenRequestHandler(requestor); // set notifier to deliver responses this.authorizationHandler.setAuthorizationNotifier(this.notifier);