kirby-oauth
kirby-oauth copied to clipboard
Plugin ignores 'panel.slug' configuration and defaults to /panel after oAuth process
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.