Bug Report - Weird Token Exchange Error in Authentication Process
wiseaidev opened this issue · 2 comments
Bug Description:
I encountered an issue while exchanging the token for authorization in the authentication process. The error message indicates a "400 Bad Request" with the following details:
- Reason: Sorry, the code you provided is not valid. It has already been used, or has expired.
- Nylas Error Type: api_error
This issue is perplexing because the token exchange process appeared to be successful, but the error suggests otherwise.
Steps to Reproduce:
- Initialize the authentication process.
- Successfully acquire the code for token exchange.
- Attempt to exchange the code for an access token.
- Encounter the "400 Bad Request" error with the mentioned error details.
Expected Behavior:
The token exchange should proceed without errors, and a valid access token should be provided.
Actual Behavior:
The token exchange process results in a "400 Bad Request" error with the stated error message.
Workaround:
Just ignore the error with a try-except
block.
Impact:
This issue is affecting the successful completion of the authentication process and not preventing us from using the Nylas API effectively - a slight delay in the auth process.
Thank you for your attention to this matter, and I look forward to your assistance in resolving this problem.
Sincerely,
Mahmoud
Hey @wiseaidev! Thanks for opening the issue. Can you please share the Python code you're using so I can try to reproduce the bug? Thanks!