diff --git a/index.js b/index.js index b58f035..f0bec1f 100644 --- a/index.js +++ b/index.js @@ -107,13 +107,30 @@ app.post( app.post( "/force-login", getAuthorizationControllerFactory({ - claims: { id_token: { auth_time: { essential: true } } }, + claims: { + id_token: { + amr: { essential: true }, + auth_time: { essential: true }, + }, + }, prompt: "login", // alternatively, you can use the 'max_age: 0' // if so, claims parameter is not necessary as auth_time will be returned }), ); +app.post( + "/force-2fa", + getAuthorizationControllerFactory({ + claims: { + id_token: { + amr: { essential: true }, + acr: { essential: true, value: "https://refeds.org/profile/mfa" }, + }, + }, + }), +); + app.get(process.env.CALLBACK_URL, async (req, res, next) => { try { const client = await getMcpClient(); diff --git a/views/index.ejs b/views/index.ejs index e13a46d..d700b4b 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -92,6 +92,10 @@
+