String generateCodeChallenge(String verifier) { var bytes = utf8.encode(verifier); var digest = sha256.convert(bytes); return base64UrlEncode(digest.bytes).replaceAll("=", ""); }