Redirect URL issue in oauth_config.json

Hello,

I am working on an app to integrate DocuSign with Freshservice. I am unable to do the authentication with DocuSign to get the access token.

I checked the issue and found that redirect URL from Freshservice contains this redirect URL redirect_uri=http%3A%2F%2Flocalhost%3A10001%2Fauth%2Fcallback%3Fcallback%3Dhttp%3A%2F%2Flocalhost%3A10001%2Fcustom_configs%3Fproduct%3Dfreshservice%26product%3Dfreshservice which cause an issue

Please advice us on how to send OAuth redirect URL from Freshservice.

Code:

 {
    "client_id": "***********************",
    "client_secret": "*************************",
    "authorize_url": "https://account-d.docusign.com/oauth/auth",
    "token_url": "https://account-d.docusign.com/oauth/code",
    "options": {
        "redirect_url" : ["http://localhost:10001/auth/callback"],
        "scope": "signature"
    },
    "token_type": "account",
    "oauth_iparams": {
    }
  }

Thanks,
Hassan

1 Like

Following up on this thread for the update.
We are still facing this issue and our client’s project has been on hold because of it.

2 Likes

Hi Hassan,
I think you need to remove the redirect_url from the options,
and you need to add the redirect_url in the oauth provider.

Kindly refer this document for more information

2 Likes

Hello Santhosh,

Still facing same issue after providing redirect_url in oauth provider.

      {
        "client_id": "********************************",
        "client_secret": "********************************",
        "authorize_url": "https://account-d.docusign.com/oauth/auth",
        "token_url": "https://account-d.docusign.com/oauth/code",
        "redirect_url": "http://localhost:10001/auth/callback",
        "options": {
            "scope": "signature"
        },
        "token_type": "account",
        "oauth_iparams": {}
      }
1 Like

Hi,

{
        "client_id": "********************************",
        "client_secret": "********************************",
        "authorize_url": "https://account-d.docusign.com/oauth/auth",
        "token_url": "https://account-d.docusign.com/oauth/code",
        "options": {
            "scope": "signature"
        },
        "token_type": "account",
        "oauth_iparams": {}
      }

You need to remove the redirect_url from the JSON.
if you are still facing the issue, Kindly share the error what you get in the console.

Thanks

1 Like

Hi @Hassan_Tasleem1,

Please refer this post. It may solve your issue.

Best,
Arshath

1 Like

Hi @arshath.h,

Sure, i will check and respond accordingly

Thanks,
Hassan

1 Like

Hi @arshath.h,

Thanks for the solution, now it works after deployment
but still facing the same issue while trying to test the code on local
So, is there any way we can test the app on local

Thanks,
Hassan

2 Likes

Hi,
I think DocuSign is not supporting the query params in redirect URL,
Kindly confirm,
if it is not supporting then you need to request the support from DocuSign.

Thanks

1 Like

Hi @Santhosh,

I have create a ticket on DocuSign and waiting for the reply
as soon as i will get the response from there i will confirm this

Thanks,
Hassan

3 Likes

Hi @Santhosh,

I have got the reply from DocuSign support and they confirm that they allow query params in redirect URL.

1. You must define at least one redirect URI to implement any authentication scenario in your integration key configuration.
2. In the request URL the value supplied for redirect_uri must exactly match one of the defined ones in the integration key configuration
3. Redirect URI may include query parameter
3.1 For example: https://localhost:8080/public/index.php?page=ds_callback
4. It could take up to 5 minutes for the newly saved URI’s to take effect.
5. Fragment indicator (#) is not allowed as part of the URI as per OAuth
6. Redirect URI must include the full path to the host including protocol
6.1 For example: https://localhost:8080

Actual response i have got from there

Thanks,
Hassan

1 Like

We are also facing similar issues when using Google Authentication. After a little investigation, I have identified that there is a space in the redirect_uri URL generated by the FDK. It can be reproduced with/without redirect_uris entry in the oauth_config.json (It appears that FDK automatically uses the localhost URL for testing even if you enter a remote URL).

http://localhost:10001/auth/callback?callback= https://***.freshdesk.com/a/tickets/702292?dev=true&product=freshdesk

This prevents us from testing the application internally before using it in the production environment.