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.12k stars 3.69k forks source link

[Bug]: Handle OAuth redirection when user has been logged out #10908

Closed sumitsum closed 2 years ago

sumitsum commented 2 years ago

Is there an existing issue for this?

Current Behavior

Not sure if this can be solved from our end: This issue was seen with keap aka infusionsoft Oauth server. Sometimes during Oauth process the keap server indicates that the user has been logged out and redirects to the login page. Upon doing the login the expectation is to be re-directed to the Appsmith page but no such re-direction happens.

Steps To Reproduce

  1. Set up OAuth with keap.
  2. Log out of keap account.
  3. Create a new datasource and choose Oauth authentication and Authorization Code based authorization. Now fill the remaining configs and click on save and authorize.
  4. See that the browser re-directs to keep which throws a logged out error and then asks to login again. Click on the login button and do login. Now the expectation is to be re-directed to Appsmith page but no such re-direction happens.

Environment

Production

Version

Cloud

Nikhil-Nandagopal commented 2 years ago

@sumitsum need more information here. What do you mean by it should be redirected to the Appsmith Page? Which Appsmith page is this? Shouldn't this trigger the authentication flow for the user again?

sumitsum commented 2 years ago

@Nikhil-Nandagopal I meant re-directing to the Appsmith datasource page, after which the user could either manually re-trigger the authentication process or we auto re-trigger the authentication process.

Nikhil-Nandagopal commented 2 years ago

@sumitsum since this can happen to app viewers as well, we should take folk to the authentication screen instead of the datasource page right?

sumitsum commented 2 years ago

@Nikhil-Nandagopal yes, in case of view mode when the viewer can also authenticate then the re-direction should be to the authentication screen.

Nikhil-Nandagopal commented 2 years ago

So this is related to #3313 because without it we cannot have this