Skip to content

feat: improved prompt handling - #55

Merged
patchandthat merged 28 commits into
RockSolidKnowledge:release/3.0.0from
equist:feat/improved-prompt-handling
Sep 9, 2026
Merged

feat: improved prompt handling#55
patchandthat merged 28 commits into
RockSolidKnowledge:release/3.0.0from
equist:feat/improved-prompt-handling

Conversation

@equist

@equist equist commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Description

Improvments of prompt and max_age parameter handling.

Type of change

[ ] Bug fix
[x] Feature
[ ] Refactoring
[ ] Documentation
[ ] Other

Implementation of feature #54.

Does this PR introduce a breaking change?

[x] Yes
[ ] No

The old code ignored unsupported prompt modes, but this implementation returns an error to the client.

Testing

I have fixed an error in an existing integration test.
There are several new integration tests.

LLM Usage

I have not used LLM, except for the extended auto-complete feature primarly used for XML comments.
I used co-pilot to set up some structure for the IdentityServerApplicationBuilderExtensionsTests class.

Other context

I believe this implementation is better aligned with current Duende IdentityServer implementation, but it is a breaking change compared to IdSrv 4 code base which ignored unsupported prompt values.

Comment thread src/Open.IdentityServer/src/Endpoints/AuthorizeEndpointBase.cs
Comment thread src/Open.IdentityServer/src/Validation/Default/AuthorizeRequestValidator.cs Outdated
Comment thread src/Open.IdentityServer/src/Validation/Default/AuthorizeRequestValidator.cs Outdated
Comment thread src/Open.IdentityServer/src/Constants.cs Outdated
@equist

equist commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

I hope that I have fixed all your comments now. I'm sorry for missing unit tests and I'll do better next time :)

// then we don't want to prompt the user again, so skip handling of the parameter
var promptProcessed = request.Raw.Get(Constants.ProcessedParameters.PromptProcessed);

if (!promptProcessed.IsPresent())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove this PromptProcessed check.
The whole request is meant to be replayed and validated once authentication has taken place. If the login took more time than the max age then it should be failed. It also complicates the flow and requires additional constant values.

@andrewclymer

Copy link
Copy Markdown
Collaborator

@equist Jo has some outstanding feedback. Can you act on it? Or would you like a call to agree on a plan so we can commit to this work? We really appreciate your contribution.

@equist

equist commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@equist Jo has some outstanding feedback. Can you act on it? Or would you like a call to agree on a plan so we can commit to this work? We really appreciate your contribution.

I'm waiting for you to give me feedback on my last comment. I find it hard to act on the original feedback, since the suggested solution will result in impossible to sign-in paths for end users as I explained above.
If a call equals a online meeting to discuss it, we can scheduel that :)

@patchandthat
patchandthat self-requested a review September 1, 2026 13:39
Added RemoveMaxAge to handle max_age the same way.
…eping the values otherwise so that the login page knows way login is shown.
…ocessed and should not re-trigger login so that it will also work with request objects.
Explained the usage of the processed parameters.
@equist
equist force-pushed the feat/improved-prompt-handling branch from 0044a73 to 599cef1 Compare September 3, 2026 11:31
@equist equist changed the title Feat/improved prompt handling feat: improved prompt handling Sep 3, 2026
@equist
equist requested a review from JoStevensRSK September 6, 2026 10:33
Sets the prompt modes that are supported by IdentityServer.
Defaults to *login*, *consent*, *select_account* and *none*.
When *CreateAccountUrl* is set, then *create* is also added to the supported prompt modes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a line here stating that unsupported prompts will cause an authorization request to fail

public string CreateAccountReturnUrlParameter { get; set; } = Constants.UIConstants.DefaultRoutePathParams.CreateAccount;

/// <summary>
/// Gets or sets the supported prompt modes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add to the summary that prompts not in the supported collection will cause authorization requests to fail

@JoStevensRSK JoStevensRSK left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just those two docs, and can you target v3, as this pr is a breaking change

@patchandthat
patchandthat changed the base branch from main to release/3.0.0 September 8, 2026 15:40

@patchandthat patchandthat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@patchandthat
patchandthat merged commit e3ce9de into RockSolidKnowledge:release/3.0.0 Sep 9, 2026
1 check passed
@equist

equist commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@patchandthat and @JoStevensRSK I send you an email today. Have you recieved it? I also sent two e-mails to @JoStevensRSK earlier this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improved handling of prompt parameter Add full support for OIDC prompt=create

4 participants