Skip to content

Conversation

@Inverle
Copy link
Contributor

@Inverle Inverle commented Sep 13, 2025

<?php
declare(strict_types=1);

class FreshExtension_auth_Controller extends FreshRSS_auth_Controller {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am worried about the maintenance of this approach based on copying and overriding.
Would you be able to find another approach based on an extension hook (a new one)?
This way, it would both made this part more realistic to maintain and maybe also enable other custom login types

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also enable other custom login types

This isn't really a login type, but an extension of form login.
I'm aware of this TODO:

https://github.com/FreshRSS/FreshRSS/blob/128c375fc9de5119b1963d92dc9cd3e423053111/app/Models/Auth.php#L96-L98

Maybe some sort of hook should be put here?

https://github.com/FreshRSS/FreshRSS/blob/128c375fc9de5119b1963d92dc9cd3e423053111/app/Controllers/authController.php#L124-L125

Copy link
Member

@Alkarex Alkarex Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really a login type, but an extension of form login

Indeed. But maybe what about making it a new extension-defined login type?

Edit: and which could fall back to the native logins (e.g. Web form) if it does not have the required parameters to log in

Copy link
Contributor Author

@Inverle Inverle Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe some sort of hook should be put here?

By the way I meant somewhere above not specifically in the POST if condition :p

Indeed. But maybe what about making it a new extension-defined login type?
Edit: and which could forward to the Web form login if it does not have the required parameters to log in

That would be a little more complicated than the current implementation.
I have considered this though

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants