appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.77k stars 3.77k forks source link

[Bug]: Re-authorization issue in datasource #15244

Open SreelakshmiV12 opened 2 years ago

SreelakshmiV12 commented 2 years ago

Is there an existing issue for this?

Description

I have created a datasource with Authentication Type: Oauth 2.0 and Grant type : Authorization code, and saved the datasource in my app. When I tried to run an API using this datasource, it failed because access token was expired within 1 hour. So I need to re-authorize datasource in every hour to run the API. I need to know that how to re-authorize without coming to datasource.

Steps To Reproduce

  1. Create new datasource (Autheniticated API) with Authentication Type: Oauth 2.0 and Grant type : Authorization code
  2. Create an API using this datasource.
  3. API run without any error initially. But after every hour, access token was expired and we need to re-authorize datasource to fix the error.

Public Sample App

No response

Version

Appsmith v1.7.8

Nikhil-Nandagopal commented 2 years ago

@SreelakshmiV12 are you working with some 3rd party API or an internal API? With most 3rd party APIs like google, I've seen that you may need to request offline access in the scopes of the API https://developers.google.com/identity/protocols/oauth2/web-server#offline

Do re-open this if you're still facing this issue

jessydm commented 2 weeks ago

I am using zoho books as authenticated API data source on self-hosted instance of latest Appsmith. We are getting the same issue as described above.

Nikhil-Nandagopal commented 2 weeks ago

@jessydm have you tried requesting for offline access? We would be happy to debug the issue with you

jessydm commented 2 weeks ago

Yes...the offline access was requested. Everything works fine till Token expires and one it expires, the only way to make it work is to go back to data source and reauthorize it.

On Fri, Nov 15, 2024, 3:04 AM Nikhil Nandagopal @.***> wrote:

@jessydm https://github.com/jessydm have you tried requesting for offline access? We would be happy to debug the issue with you

— Reply to this email directly, view it on GitHub https://github.com/appsmithorg/appsmith/issues/15244#issuecomment-2478460026, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHSV2OCN64DT73TEJY3XVZ32AXBKBAVCNFSM6AAAAABRX35RUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZYGQ3DAMBSGY . You are receiving this because you were mentioned.Message ID: @.***>

jessydm commented 2 weeks ago

For sake of issue, I use this datasource on Zoho Books API

NilanshBansal commented 1 week ago

Hey @jessydm, we apologize for the inconvenience caused. Can you please share some more details about this issue to help us debug this better. You can do so by sending an email to support@appsmith.com

The details we require would be: