kirby-oauth icon indicating copy to clipboard operation
kirby-oauth copied to clipboard

Plugin ignores 'panel.slug' configuration and defaults to /panel after oAuth process

Open asabosch opened this issue 7 months ago • 0 comments

Hi,

I've set the Kirby configuration option for the panel slug: 'panel' => ['slug' => 'backend']

Unfortunately, the plugin redirects to /panel after the oAuth process, ignoring the custom slug setting.

Code Example:

Here's the relevant part of the plugin's code, class Controller:

private function goToPanel() {
    go("panel");
}

Expected Behavior:

The plugin should read the Kirby configuration setting for panel.slug and use that instead of hardcoding the /panel path.

Steps to Reproduce:

  • Set panel.slug in Kirby configuration to a custom value, e.g., 'backend'.
  • Perform an oAuth process that triggers the redirect to the panel.
  • Observe that the plugin redirects to /panel instead of the custom slug.

Suggested Fix:

Modify the plugin to read the Kirby configuration setting for panel.slug and use that value for redirection.

Thank you for considering this enhancement.

asabosch avatar Jul 02 '24 19:07 asabosch