File tree Expand file tree Collapse file tree
packages/b2c-tooling-sdk/src/auth Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export interface ImplicitOAuthConfig {
4747 * Returns the HTML page served to the browser to extract the access token
4848 * from the URL fragment and redirect it as query parameters.
4949 */
50- function getOauth2RedirectHTML ( port : number ) : string {
50+ function getOauth2RedirectHTML ( redirectUri : string ) : string {
5151 return `
5252<!DOCTYPE html>
5353<html lang="en">
@@ -58,7 +58,7 @@ function getOauth2RedirectHTML(port: number): string {
5858<body onload="doReturnFlow()">
5959<script>
6060 function doReturnFlow() {
61- document.location = "http://localhost: ${ port } /?" + window.location.hash.substring(1);
61+ document.location = "${ redirectUri } /?" + window.location.hash.substring(1);
6262 }
6363</script>
6464</body>
@@ -352,7 +352,7 @@ export class ImplicitOAuthStrategy implements AuthStrategy {
352352 // Serve HTML page to extract token from URL fragment
353353 logger . debug ( '[Auth] Serving token extraction HTML page' ) ;
354354 response . writeHead ( 200 , { 'Content-Type' : 'text/html' } ) ;
355- response . write ( getOauth2RedirectHTML ( this . localPort ) ) ;
355+ response . write ( getOauth2RedirectHTML ( this . redirectUri ) ) ;
356356 response . end ( ) ;
357357 } else if ( accessToken ) {
358358 const authDuration = Date . now ( ) - startTime ;
You can’t perform that action at this time.
0 commit comments