... mebedtls' base64 routine has a strange behavioral issue where if the input is invalid, it will not report it as invalid, but rather returning a bunch of garbage data. This new round-tripping padding method should eliminate such issue.
Correctly handle token decoding when '=' has been trimmed by the backend server. Co-Authored-By: liushuyu <liushuyu011@gmail.com>