"Invalid Params" and "Bug in code" error integrating JWY Custom Auth in Next


We are unable to integrate web3auth to our project.

We are using JWT token and next/react.

On the downloaded demo repo we are geting this error:

Here are the params:

Any ideas?

1 Like

Hey @pedro, I see that you are passing the same clientID variable where Web3Auth clientID is required(in Web3AuthNoModal constructor) and even where Google client ID is needed (in loginConfig inside the OpenLoginAdapter).
If you need to create a new Google verifier, please follow these steps
Then replace the clientID under OpenLoginAdapter with GOOGLE_CLIENT_ID.apps.googleusercontent.com where you’ll get GOOGLE_CLIENT_ID from the abovementioned steps.

Hello @maharshi thanks, but i believe this only applys to Google Integration.

We are using JWT Custom Auth, not Google.

Help anyone?

1 Like

@gonzalo In case of JWT Custom Auth I would request you to follow the connectTo function alongside the verifier set up from here Bring your own custom JWT Providers | Documentation | Web3Auth.
And please it would be great if you could provide a sample idToken.

Hello @maharshi,

We followed the Custom JWT Provider docs step by step and still geting “Invalid Params” error.

Here are some screenshots:



Verifier Info:


And, as you ask, here is a sample Id access token:
“access_token”: “eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImFscGhhLW51bWVyaWMtcmFuZG9tLXN0cmluZyJ9.eyJzdWIiOjIzNiwibmFtZSI6bnVsbCwiZW1haWwiOiJ0ZWNuaWNvZXN0ZWJhbjAxQGdtYWlsLmNvbSIsImF1ZCI6InRlc3QtYXBpLndpbi5pbnZlc3RtZW50cy9hcGkvdjIiLCJpc3MiOiJodHRwczovL3Rlc3QtYXBpLndpbi5pbnZlc3RtZW50cyIsImlhdCI6MTY4OTA5NTcxMSwiZXhwIjoxNjg5MDk5MzExfQ.InJG7WmiLYNzU9l7MKVA0W01utkRMbRkEAYq8jUMPOo2W6iqxjhLtCjpV22pV9ME8L4g2QUBoLcI_qOD2F5r_w”

Hi @gonzalo,
Sorry for the delay. Our community portal was undergoing some URL changes as you might be able to see in the URL bar.
Could you please check on your dashboard if the Verifier ID for your verifier is sub or email?
The reason that I am asking this is that inside the code you have put verifierIdField as aud, which might not be the matching verifierIDField you might have chosen while creating the verifier resulting in the invalid params error you are getting.
I assume you have mistaken verifierIdField for the JWT validation field which is actually aud. Basically, verifierIdField can be any field which sets each person logging in apart. It should be unique, so the best bet would be on sub or email.

Hello @maharshi, thanks for the reply it was very clear, help us find the error and finally we are able to connect to the verifier.

We will continue with implementation and create another ticket if needed.

Thanks !!!

1 Like

@gonzalo All the best for your implementation. I’ll close this thread for now. But feel free to start another thread as an when you require assistance.

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