OAuth Grant Type Disabled for Authorization Code Grant Type

When trying to connect to Web3Auth with custom JWT provider I get this error

error
: 
"unauthorized_client"
error_description
: 
"The+%5Bimplicit%5D+Implicit+grant+has+been+disabled+for+this+client."
error_reason
: 
"grant_type_disabled"
state
: 
"eyJjbGllbnQiOiJCQmNpTkI4Xy1hamFBYkNUQ2NNbE1GRWtiUlFuNWw1QzVCcllxMjVsaXdqV3RtOThYOTJabXNlSEFFMDE0RHF5WnhXY3FpOXB5Ul8wRmtnRXRaNHNRU1kiLCJjdXJyZW50TG9naW5Qcm92aWRlciI6Imp3dCIsInBvcHVwV2luZG93IjoiZmFsc2UiLCJ3aGl0ZUxhYmVsIjoie1wiYXBwTmFtZVwiOlwiS2xhbmdcIixcImFwcFVybFwiOlwiaHR0cHM6Ly93d3cua2xhbmctZ2FtZXMuY29tL1wiLFwibG9nb0xpZ2h0XCI6XCJodHRwczovL3dlYjNhdXRoLmlvL2ltYWdlcy93ZWIzYXV0aC1sb2dvLnN2Z1wiLFwibG9nb0RhcmtcIjpcImh0dHBzOi8vd2ViM2F1dGguaW8vaW1hZ2VzL3dlYjNhdXRoLWxvZ28tLS1EYXJrLnN2Z1wiLFwiZGVmYXVsdExhbmd1YWdlXCI6XCJlblwiLFwibW9kZVwiOlwibGlnaHRcIixcInRoZW1lXCI6e1wicHJpbWFyeVwiOlwiIzAwRDFCMlwifSxcInVzZUxvZ29Mb2FkZXJcIjp0cnVlfSIsImtleU1vZGUiOiJ2MSIsImxvZ2luSWQiOiI1NTM2Njk1ZGUzYzU3NzNlNjU3YjY2ZDc2YTM5Y2I5NjNkOWJiZDQwMjBmZWRjY2E2MzBjZTA4MmJlMGEwNjUwIiwic2Vzc2lvbk5hbWVzcGFjZSI6IiIsInNvY2lhbEZhY3RvckZsb3ciOiIiLCJ2ZXJzaW9uIjoiOSIsImluc3RhbmNlSWQiOiJ1YnJzNTZrdDMyIiwidmVyaWZpZXIiOiJrbGFuZyIsInR5cGVPZkxvZ2luIjoiand0IiwicmVkaXJlY3RUb09wZW5lciI6ZmFsc2V9"
[[Prototype]]
: 
Object

Here’s how I’m connecting

await web3AuthInstance.connectTo(WALLET_ADAPTERS.AUTH, {
          loginProvider: "jwt",
          extraLoginOptions: {
            id_token: data.id_token,
            verifierIdField: "email",
            domain: 'https://login.seed.game/oauth2',
            redirectUrl: window.location.origin,
          },
        });

I’m not using Auth0, I’m using a custom JWT provider

Hi Robel,

Thanks for providing detailed information, it really helps! From your error message unauthorized_client with the description "The+%5Bimplicit%5D+Implicit+grant+has+been+disabled+for+this+client.", it looks like there’s an issue with the OAuth grant type configuration with your custom JWT provider.

Here’s what might be happening:

  1. Authorization Grant Type: It seems that your OAuth server is configured to use the Authorization Code Grant but it’s possibly receiving a request related to the Implicit Grant. Please verify if the correct grant type is enabled on your OAuth server settings.

  2. Redirect URI: Ensure that the redirectUrl you’re using matches exactly with the one registered in your OAuth provider settings. Any mismatch can potentially lead to this kind of error.

  3. Configuration Details: Double-check if you’ve correctly set up your verifier details in the Web3Auth dashboard, matching how your JWT provider is expecting the input.

Since this issue points towards OAuth configuration on your JWT provider, ensure that the settings on your provider’s side support the flow you’re trying to use.

If you’ve already verified these and it’s still persisting, you might want to reach out to your OAuth provider to check logs or settings, or get in touch with our support to further diagnose it.

Let me know if you need further assistance!

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours

I would like to know if there’s an option to use authorization_code grant type instead for web3auth