dominik-th / matomo-plugin-LoginOIDC

external authentication services for matomo
https://plugins.matomo.org/LoginOIDC/
GNU General Public License v3.0
41 stars 29 forks source link

fails to register new user #4

Closed blizzz closed 4 years ago

blizzz commented 5 years ago

It seems that this is true when a new user logs in: https://github.com/dominik-th/matomo-plugin-LoginOIDC/blob/38eaba03d38f317af57d6682021267aa6fd0df37/Controller.php#L189

Then linkAccount() won't be called and thus no provisioning happens. But perhaps I am missing something?

blizzz commented 5 years ago

later, in linkAccount() the matomo user is being fetched through Piwik::getCurrentUserLogin() which yields anonymous. And that does not have view permissions. Is it supposed to work like that?

dominik-th commented 5 years ago

The plugin is not meant to register a completely new user.

You can link your account when you are logged in and visit the personal settings page. Is that what you mean?

blizzz commented 5 years ago

@dominik-th I am always ending up with the LoginOIDC_ExceptionUserNotFound exception, because the current user is always anonymous.

dominik-th commented 5 years ago

For the linking process you have to be logged in.

You can find the button on this settings page: https://MATOMO_URL/index.php?module=UsersManager&action=userSettings&idSite=1&period=range&date=last30

blizzz commented 5 years ago

does it not defeat the purpose of SSO when you need to have a local account first?

dominik-th commented 5 years ago

For me it is the convenience as I am logged into my authentication provider anyways and don't have to lookup my matomo password.

But I agree that we could extend the plugin to allow new users to register.