- Issue created by @AnokR
- ๐ฎ๐ณIndia AnokR
Also, getting this error after fixing the above error.
The website encountered an unexpected error. Please try again later.
OAuthException: Invalid OAuth state in Drupal\docusign_signature\DocuSignAuth\CodeGrant->authCallback() (line 46 of modules/contrib/docusign_signature/src/DocuSignAuth/CodeGrant.php).
-
S3b0uN3t โ
committed 4522c76f on 1.0.x
Issue #3382502: Website getting issue on redirecting on Oauth callback
-
S3b0uN3t โ
committed 4522c76f on 1.0.x
- Assigned to S3b0uN3t
- Status changed to Fixed
over 1 year ago 1:15pm 22 August 2023 - ๐ซ๐ทFrance S3b0uN3t Nantes
Hello,
You are absolutely right. It's a misprint on my part.
Thank you for your feedback and your attention! :)
- ๐ฎ๐ณIndia AnokR
Thank you for quick reply. Can you please check and fix issue in comment #2. for the second error?
- Status changed to Postponed: needs info
over 1 year ago 12:07pm 23 August 2023 - ๐ซ๐ทFrance S3b0uN3t Nantes
Sorry, I didn't see your comment yesterday.
Our comments crossed.Can you tell me more about the situation in which you encounter this error?
The GET parameter must correspond to what is normally declared in session.Can you check what this GET parameter is worth and what you have in session when it throws you the error?
- ๐ฎ๐ณIndia AnokR
http:://[Domain]/docusign/signature/callback/oauth?code=[CODE]
Actually I have this request which is returning 400 (Bad request) and it will return the
{ "error": "invalid_grant" }
As I debug it is throwing error at this file
OAuthException: Invalid OAuth state in Drupal\docusign_signature\DocuSignAuth\CodeGrant->authCallback() (line 46 of modules/contrib/docusign_signature/src/DocuSignAuth/CodeGrant.php).But other requests are working before this request like
Login, state etc. - ๐ซ๐ทFrance S3b0uN3t Nantes
I won't have time to test until next week.
Feel free to provide a fix as a path or merge request. - ๐ฎ๐ณIndia AnokR
Sure, let me know. If you found something. It seems the api issue the token request is not working. It would be good if we can change the little bit to get it working.
thanks! - Status changed to Fixed
over 1 year ago 3:40pm 5 September 2023 - ๐ซ๐ทFrance S3b0uN3t Nantes
Hi,
After several tests, it turns out that the OAuth callback is operational (both with Code Grant or JWT Grant).
However, I noticed caching issues on the OAuth callback when page caching was enabled.
I fixed this problem.
In the context of normal use, we are now redirected to the initial page (and no longer to "/docusign/signature/callback/oauth" without a parameter in the URL).Good luck for the future and don't hesitate to make suggestions for developments (or submit them).
- ๐ฎ๐ณIndia AnokR
Thanks for your reply. can you push your latest updates so I can test at my end.
However I will try to check with disabling the page cache.
thanks - ๐ซ๐ทFrance S3b0uN3t Nantes
Hello,
Changes are already available in dev version.
The ยซ invalid grant ยป error provides when you call Docusign OAuth callback url without query parameters or if you donโt have a state define in temporary store (this state is defined on each Docusign OAuth request).
By default, the callback is the current page (the page where you request Docusign). Donโt hesitate to create a task and purpose a merge request to define a default callback path.
Cheers
Automatically closed - issue fixed for 2 weeks with no activity.