Troubleshooting 401 Error: Configuring JWT in My Testing File

"{
order jwtauth before basicauth
}

:80 {

    jwtauth {
            sign_key "M.....B"                                                                                                        
            sign_alg RS256                                                                                   
            jwk_url https://auth.....
            from_query access_token token                                                       
            from_header X-Api-Token                                                             
            from_cookies user_session                                                           
            issuer_whitelist https://auth.....      
            audience_whitelist https://192.168.**:8080                                        
            #user_claims aud uid user_id username login                                         
            #meta_claims "IsAdmin->is_admin" "settings.payout.paypal.enabled->is_paypal_enabled"
    }
    reverse_proxy 192.168.**:8000

}"

I am working on a testing file and aiming to configure JWT. However, I am encountering a ‘401’ error after passing the bearer token. Could you assist me in configuring this?

Nowhere near enough detail here to help. You only shared part of your config. We also need to see your logs, an example request with curl -v, the version you’re running, how you installed Caddy, etc.

Please fill out the help topic template as per the forum rules.

Also, looks like you’re using a plugin. I don’t use that plugin, so you might be better off getting help on that plugin’s github repo.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.