From 4ef3f1f6ca82a46263bec1c1f7467ea63dcc043e Mon Sep 17 00:00:00 2001 From: jaxoncreed Date: Thu, 24 Aug 2023 16:38:25 -0400 Subject: [PATCH] Added the prompt parameter Updated LoginInputOptions type to include prompt Update changelog --- CHANGELOG.md | 1 + packages/core/src/ILoginInputOptions.ts | 5 +++++ packages/node/src/login/oidc/OidcLoginHandler.ts | 1 + 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e8ee48558..d51560dbb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The following have been deprecated, and will be removed in future major releases ## Unreleased The following changes have been implemented but not released yet: + - Added `prompt` as a login option. ## [1.17.1](https://github.com/inrupt/solid-client-authn-js/releases/tag/v1.17.1) - 2023-07-15 diff --git a/packages/core/src/ILoginInputOptions.ts b/packages/core/src/ILoginInputOptions.ts index 91faf78f2f..e8c84252ef 100644 --- a/packages/core/src/ILoginInputOptions.ts +++ b/packages/core/src/ILoginInputOptions.ts @@ -55,4 +55,9 @@ export default interface ILoginInputOptions { * secret to authenticate. */ refreshToken?: string; + /** + * OIDC prompt. Options include "none", "login", "consent", "select_account", and "create". Not all Solid Identity + * Providers support OIDC prompt. + */ + prompt?: string; } diff --git a/packages/node/src/login/oidc/OidcLoginHandler.ts b/packages/node/src/login/oidc/OidcLoginHandler.ts index a1f56046fc..c5c2d5db16 100644 --- a/packages/node/src/login/oidc/OidcLoginHandler.ts +++ b/packages/node/src/login/oidc/OidcLoginHandler.ts @@ -119,6 +119,7 @@ export default class OidcLoginHandler implements ILoginHandler { )), handleRedirect: options.handleRedirect, eventEmitter: options.eventEmitter, + prompt: options.prompt }; // Call proper OIDC Handler return this.oidcHandler.handle(oidcOptions);