In this video I walk through setting up services to decode JWT's in a Rails API. I use Kinde as an example but the process applies to any third party auth provider that uses a JWT (JSON Web Token) and exposes public JWKS (JSON Web Key Set).
Sample code is available in the GitHub repo: https://github.com/kengreeff/kinde-auth