Skip to content

Commit 0f8d690

Browse files
committed
Use prompt=none to achieve silent login in BFF v4
1 parent ec33108 commit 0f8d690

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

  • BFF/v4
    • DPoP/DPoP.Bff/wwwroot
    • OpenApi/OpenApi.Bff/wwwroot
    • TokenExchange/TokenExchange.Bff/wwwroot

BFF/v4/DPoP/DPoP.Bff/wwwroot/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const loginUrl = "/bff/login";
2-
const silentLoginUrl = "/bff/silent-login";
2+
const silentLoginUrl = "/bff/login?prompt=none";
33
const userUrl = "/bff/user";
44
const localApiUrl = "/local";
55
const remoteApiUrl = "/api";
@@ -224,7 +224,7 @@ function silentLogin(iframeSelector) {
224224
// we can either just treat this like a "not logged in"
225225
resolve(false);
226226
// or we can trigger an error, so someone can look into the reason why
227-
// reject(new Error("timed_out"));
227+
// reject(new Error("timed_out"));
228228
}, timeout);
229229

230230
// send the iframe to the silent login endpoint to kick off the workflow

BFF/v4/OpenApi/OpenApi.Bff/wwwroot/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const loginUrl = "/bff/login";
2-
const silentLoginUrl = "/bff/silent-login";
2+
const silentLoginUrl = "/bff/login?prompt=none";
33
const userUrl = "/bff/user";
44
const apiUrl = "/api1/weatherforecastFahrenheit";
55
let logoutUrl = "/bff/logout";
@@ -148,7 +148,7 @@ function silentLogin(iframeSelector) {
148148
// we can either just treat this like a "not logged in"
149149
resolve(false);
150150
// or we can trigger an error, so someone can look into the reason why
151-
// reject(new Error("timed_out"));
151+
// reject(new Error("timed_out"));
152152
}, timeout);
153153

154154
// send the iframe to the silent login endpoint to kick off the workflow

BFF/v4/TokenExchange/TokenExchange.Bff/wwwroot/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const loginUrl = "/bff/login";
2-
const silentLoginUrl = "/bff/silent-login";
2+
const silentLoginUrl = "/bff/login?prompt=none";
33
const userUrl = "/bff/user";
44
const localApiUrl = "/local";
55
const remoteApiUrl = "/api";
@@ -165,7 +165,7 @@ function silentLogin(iframeSelector) {
165165
// we can either just treat this like a "not logged in"
166166
resolve(false);
167167
// or we can trigger an error, so someone can look into the reason why
168-
// reject(new Error("timed_out"));
168+
// reject(new Error("timed_out"));
169169
}, timeout);
170170

171171
// send the iframe to the silent login endpoint to kick off the workflow

0 commit comments

Comments
 (0)