'Is there any way to remove special characters from auth code in cognito

I am using cognito social login for our application when I am trying to login using Facebook, after successful login it gives me code and using that code we generate token, but in the code I am getting special characters at the end of code due to that I am not able to generate token, in the postman it gives me error as invalid grant



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source