FriendsOfFlarum / passport

The Laravel passport compatible oauth extension for your Flarum forum.
https://discuss.flarum.org/d/5203
MIT License
29 stars 12 forks source link

Removed your package and Flarum does not refresh the logout and activation status #20

Closed Benoit1980 closed 3 years ago

Benoit1980 commented 3 years ago

Version Flarum Beta 16

I have just installed your latest package and could not get it to work unforunately. I decided to remove it from the admin panel and now the logout sessions and account activations do not refresh their status unless I manually refresh the(reload) the page.

ie: I log out, the user profile still shows in the navbar, I refresh the page, the user name disappear.

Any idea how I can get the forum back to normal?

Thank you.

Benoit1980 commented 3 years ago

A very problematic package with Beta16. I reinstalled it, uninstalled it, emptied the cache, but it killed my forum sessions. When I logout I have to refresh the page to get the logout to show as "logged out". Same with the registration links, they won't show they have been clicked until you manually refresh the page.

clarkwinkelmann commented 3 years ago

That's very odd. This extension shouldn't affect how Flarum refreshes the page after a login or logout.

Do you see any error in the browser javascript console (under developer tools) or in the Flarum log file?

Have you tried other social logins (with FoF OAuth for example) on the same forum? Because that other extension also works the same way so any issue should also happen with it.

Benoit1980 commented 3 years ago

Thanks for the reply. I did not use the other package no. What I find strange is that even if I reinstall your package, it will not show up in the admin panel(even after clearing the cache).

This is what I get on logout: Request URL: https://xxxxxxxxxxx.com/forum/logout?token=U0l9t73a0vCuy45DyQgNEaNZjd84N3r0b52VhJEl Request Method: GET Status Code: 302

clarkwinkelmann commented 3 years ago

Maybe the Composer command to install or remove the package is experiencing an error? Do you see any error or warning when running Composer?

it's normal for the logout to happen with a redirect through /logout. The token will be unique each time because it's the Flarum CSRF token. After the redirect the page should correctly show you logged out.

The logout part does not interact with social providers at all so if it's broken it must be something different. Only login is impacted by social logins.

luceos commented 3 years ago

Please post the output of php flarum info.

Benoit1980 commented 3 years ago

I am pasting the flarum info after the fof/passport installation.

As you can see, it does not show up anymore in the flarum info even after install.

composer require fof/passport Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2 Using version ^0.6.0 for fof/passport ./composer.json has been updated Loading composer repositories with package information Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2 Updating dependencies (including require-dev) Package operations: 6 installs, 0 updates, 0 removals

Thank you.

clarkwinkelmann commented 3 years ago

Are you able to update to Composer v2? It's not clear if Composer is the issue here but upgrading to Composer v2 won't hurt and it'll speed up future installs and updates.

If you haven't already, you could also try setting debug to true in config.php and try to login/logout/enable/disable extension again to see if there's any difference.

From your Composer output it doesn't seem like Composer experienced any error but if the extension doesn't show up in the admin panel it's probably Composer related in some way.

Benoit1980 commented 3 years ago

Unfortunately I cannot upgrade to composer 2 as it breaks some of my previous projects.

Benoit1980 commented 3 years ago

It is ok, no worry I will have to delete the forum as I am just too stuck with this issue. Thanks again.

clarkwinkelmann commented 3 years ago

I have just tested this extension again for the Flarum 1.0 update and did not find any issue.

I did experience something similar to you because I had the Masquerade extension enabled with "force profile fill" which does prevent logging out since every time I click on logout I am redirected to my profile. But I doubt this was your issue since it would be obvious the logout is always redirected to the Masquerade page.

I'm closing this for now but feel free to re-open if you try again and find additional details!