Impossible to obtain context if skip is true on loginRequest #3301
Unanswered
denysandriyanov
asked this question in
Q&A
Replies: 1 comment
-
Hello, Could someone please take a look on this? Thank you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone. Hope you are doing well. Faced with the following problem, asking for help, please see below
In accept login flow:
"contex" is an optional object which can hold arbitrary data.
The data will be made available when fetching the consent request under the "context" field.
This is useful in scenarios where login and consent endpoints share data.
Scenario:
AcceptLoginRequest is created with following data, where "context" is some object, let's say some string value
new AcceptLoginRequest().remember(remember)
.rememberFor(rememberFor)
.acr(acr)
.subject(subject)
.context(context);
Redirecting to HYDRA acceptLoginRequest uri with the AcceptLoginRequest created in step 1
After step 2 is completed we can do ConsentRequest.getContext() and retrive the context we set in step 1
Initiating the login flog again while remember parameter is true
Because we were already logged in getting loginRequest.getSkip() will return true, so we no longer need to enter the user but need just to acceptLoginRequest
Problem:
While it is possible to obtain the subject field from the AcceptLoginRequest that was created on step 1. It is not possible to obtain context. In other words, when we initiated the flow again and our remember parameter was set to true and we skipped the login because we were already logged it, our context got lost and we no longer cat obtain it on ConsentRequest.getContext() because it's just empty.
Question:
How we can pass context from Login to Consent if "skip scenario" is happening?
Thank you very much for your assistance.
Regards
Denys
Beta Was this translation helpful? Give feedback.
All reactions