I think it will be helpful if you read over the DNS challenge part of RFC8555 again carefully.
token
does not go directly into the DNS TXT record.
You take the token
from the challenge, and then:
- Derive the key authorization by concatenating it to your JWK thumbprint
- Calculate the SHA-256 digest of the value from (1)
- Encode the value from (2) using
base64url
... then put that in the DNS TXT record.