I am trying to authenticated web messing.
This Okta blueprint (Messenger with Authentication) uses Auth Provider to use auth code to exchange for a token.
However, my identity provider, Aws Cognito does not expose any auth code after user is authenticated to our web app, but I can retrieve access token using Aws Amplify easily.
I guess you are referring to implicit flow and sadly, this is not currently supported.
Only authorization code flow which is considered more secured.
This being said, there is currently an idea setup around this.
Have a look to Genesys Cloud Ideas Portal and add your use case to it to push this onto the top.