diff --git a/packages/browser/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.ts b/packages/browser/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.ts index 891adf0923..66851ebc30 100644 --- a/packages/browser/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.ts +++ b/packages/browser/src/login/oidc/oidcHandlers/AuthorizationCodeWithPkceOidcHandler.ts @@ -62,7 +62,7 @@ export default class AuthorizationCodeWithPkceOidcHandler // profile referenced by the WebId. loadUserInfo: false, code_verifier: true, - prompt: oidcLoginOptions.prompt ?? "consent", + prompt: 'prompt' in oidcLoginOptions ? oidcLoginOptions.prompt : "consent", }; /* eslint-enable camelcase */ diff --git a/packages/core/src/ILoginInputOptions.ts b/packages/core/src/ILoginInputOptions.ts index 91faf78f2f..4f341464c5 100644 --- a/packages/core/src/ILoginInputOptions.ts +++ b/packages/core/src/ILoginInputOptions.ts @@ -55,4 +55,11 @@ export default interface ILoginInputOptions { * secret to authenticate. */ refreshToken?: string; + /** + * Specify whether the Solid Identity Provider may, or may not, interact with the user (for example, + * the normal login process **_requires_** human interaction for them to enter their credentials, + * but if a user simply refreshes the current page in their browser, we'll want to log them in again + * automatically, i.e., without prompting them to manually provide their credentials again). + */ + prompt?: string; } diff --git a/packages/core/src/login/ILoginOptions.ts b/packages/core/src/login/ILoginOptions.ts index 41c0ce5b38..dbae614031 100644 --- a/packages/core/src/login/ILoginOptions.ts +++ b/packages/core/src/login/ILoginOptions.ts @@ -39,13 +39,6 @@ export default interface ILoginOptions extends ILoginInputOptions { // 'bundling' into this options interface), but it wouldn't be a significant // improvement really... sessionId: string; - /** - * Specify whether the Solid Identity Provider may, or may not, interact with the user (for example, - * the normal login process **_requires_** human interaction for them to enter their credentials, - * but if a user simply refreshes the current page in their browser, we'll want to log them in again - * automatically, i.e., without prompting them to manually provide their credentials again). - */ - prompt?: string; // Force the token type to be required (i.e. no longer optional). tokenType: "DPoP" | "Bearer";