core: add prompt_data to auth flow (#11702)
I added the prompt_data and user_path to the auth flow. This allows us to more easily sync users details whenever they're logged in through a Source by using the Write stage, identical to an Enrolment flow. This makes sure that mappings etc are automatically taken into consideration, and are passed to the Authentication flow. While I was at it, I made the code consistent with the `handle_enroll` method. Signed-off-by: Wouter van Os <wouter0100@gmail.com>
This commit is contained in:
@ -272,7 +272,6 @@ class SourceFlowManager:
|
||||
connection: UserSourceConnection,
|
||||
) -> HttpResponse:
|
||||
"""Login user and redirect."""
|
||||
flow_kwargs = {PLAN_CONTEXT_PENDING_USER: connection.user}
|
||||
return self._prepare_flow(
|
||||
self.source.authentication_flow,
|
||||
connection,
|
||||
@ -286,7 +285,11 @@ class SourceFlowManager:
|
||||
),
|
||||
)
|
||||
],
|
||||
**flow_kwargs,
|
||||
**{
|
||||
PLAN_CONTEXT_PENDING_USER: connection.user,
|
||||
PLAN_CONTEXT_PROMPT: delete_none_values(self.user_properties),
|
||||
PLAN_CONTEXT_USER_PATH: self.source.get_user_path(),
|
||||
},
|
||||
)
|
||||
|
||||
def handle_existing_link(
|
||||
|
Reference in New Issue
Block a user