I've been working on setting up a local OneLogin mocked service using WireMock. Everything has been going smoothly so far, as I was able to mock most of the OAuth OneLogin flow. However, I'm facing an issue with the last part that is preventing it from functioning correctly...
After submitting credentials on my Mocked OneLogin page and being redirected back to the application, I encounter an
error: RPError: failed to validate JWT signature
. Upon debugging, I realized that the problem lies with the mocked OneLogin server at the "jwks_uri": "http://localhost:27442/oidc/2/certs"
endpoint. It seems that the final step of NextAuth verification, which involves jose..compactVerify(jwt, key instanceof Uint8Array ? key : key.keyObject)
, does not align with what I have mocked, hence blocking me from proceeding with the mocked login.
Does anyone know what the /oidc/2/certs
endpoint should return in order to match the generated mocked token??
How should the JWT and the return value of oidc/2/certs
be structured in order to get approval?
I created the JWT at
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpv .............................
Upon reviewing the OneLogin documentation, I came across this link:
How can I make sure the above information matches successfully during verification? Essentially, I am looking to create an infinite JWT (RS256 alg) token that will pass verification and facilitate the OneLogin flow in a development environment.