You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let me start by saying that I am bit rusty on the topic since I haven't touched our custom auth lambda in almost two years, and that this isn't really an issue but more of an idea I'd like to discuss.
I was looking at the CognitoEvents and I was wondering if the distinction between the request and response event is actually necessary.
Since Cognito already provides an empty response object in the input event, we could remove the Response event.
This would have the added (debatable?) benefit of editing the inner response objects in place. I don't know if you like the idea, since this isn't exactly the most "Swift" way to go, but it would allow to write code which is very similar to the examples provided in the AWS doc, making the adoption easier I would guess. Those example usually edit the event.response in-place and then return the input event as the Lambda output.
Let me start by saying that I am bit rusty on the topic since I haven't touched our custom auth lambda in almost two years, and that this isn't really an issue but more of an idea I'd like to discuss.
I was looking at the
CognitoEvent
s and I was wondering if the distinction between the request and response event is actually necessary.Since Cognito already provides an empty response object in the input event, we could remove the Response event.
This would have the added (debatable?) benefit of editing the inner response objects in place. I don't know if you like the idea, since this isn't exactly the most "Swift" way to go, but it would allow to write code which is very similar to the examples provided in the AWS doc, making the adoption easier I would guess. Those example usually edit the
event.response
in-place and then return the input event as the Lambda output.POC:
The text was updated successfully, but these errors were encountered: