pulsejet/nextcloud-oidc-login

Error message on UI when deleting account logged in using OIDC login

theronakpatel opened this issue · 0 comments

Description:
When attempting to delete an account logged in using OIDC login, users are encountering an error message on the UI. The issue appears to stem from the PostLogin listener redirecting the execution for the API call, resulting in a network error.

NOTE: The issue comes only when using the delete functionality from the app drop_account.

Steps to Reproduce:

  1. Log in using OIDC authentication.
  2. Navigate to settings.
  3. Select the option to delete the account.
  4. Notice the error message displayed on the UI despite successful deletion of the account.

Expected Behavior:
Upon deletion of the account, the UI should not display any error messages and should smoothly complete the process without disruption.

Additional Notes:

  • Upon investigation, it appears that the redirection during API calls is causing the network error.
  • To resolve this issue, it is recommended to modify the behavior so that redirection does not occur during API calls.

Environment:

  • Operating Environment: Any
  • Browser: [Specify browser(s) affected]
  • Server: [Specify server configuration if relevant]

Priority: High

Attachments:
Screenshot:

image

In console:

{
    "message": "Network Error",
    "name": "AxiosError",
    "stack": "AxiosError: Network Error\n    at u.onerror (<DOMAIN>/custom_apps/drop_account/js/drop_account-personal-settings.js?v=5c1b5dac-48:2:3646697)",
    "config": {
        "transitional": {
            "silentJSONParsing": true,
            "forcedJSONParsing": true,
            "clarifyTimeoutError": false
        },
        "adapter": [
            "xhr",
            "http"
        ],
        "transformRequest": [
            null
        ],
        "transformResponse": [
            null
        ],
        "timeout": 0,
        "xsrfCookieName": "XSRF-TOKEN",
        "xsrfHeaderName": "X-XSRF-TOKEN",
        "maxContentLength": -1,
        "maxBodyLength": -1,
        "env": {},
        "headers": {
            "Accept": "application/json, text/plain, */*",
            "requesttoken": "EGCH9gTgZckCFXRiM7EBE5rxnyI5m7Vrp8Jn+49q2bg=:Zgi2n0fRAatMIEUlAsV2ZOmC02cWyIFZzo0xw85SiPU="
        },
        "method": "delete",
        "url": "<DOMAIN>/ocs/v2.php/apps/drop_account/api/v1/account"
    },
    "code": "ERR_NETWORK",
    "status": null
}