Back in 2021, I wrote about processing an AWS Cognito Authorization Code Grant using AWS Amplify. That approach worked, but it involved calling a private TypeScript method (Auth._oAuthHandler.handleAuthResponse()), manually constructing CognitoUserSession objects, and registering them with Amplify via setSignInUserSession(). It was fragile, undocumented, and guaranteed to break with