It's still not clear as to what you are attempting to accomplish. This code appears to be calling some kind of server-side validation endpoint, which
that endpoint would need to fetch the .well_known configuration document to determine the JWK endpoint and associated keys for verifying the token. The server can't trust the client side to perform any of those functions.