View attachment 55131
This addon adds a few things that I felt were missing from XenForo's PWA app:
- If the user that is installing the PWA app is logged in, auto-log them into the PWA app (don't need to force users to log-in from scratch when they first load the installed app).
- Use Sec-Fetch-Site header as replacement for CSRF with a fallback to CSRF if browser doesn't support Sec-Fetch-Site (prevent stale sessions from causing security error message)...
- Added ability to send push notices to users (Admin -> Communications -> Push users)
- New PWA option: Enable debugging (you are welcome to enable this, but it was intended for me. It spews stuff to your server error log... but feel free)
- Logs changes to user push subscriptions
- Logs web push server errors
- Delete push_subscription_updated session cookie when a new session is created (causes push subscription endpoint to be updated if old one was expired)...
- PHP 8.1+ compatibility fix
- Requires XenForo 2.2.13+
- Require a CSRF token for a user to use logout link
All JavaScript has been rewritten to be "native" (does not use jQuery) in preparation for removal of jQuery in XenForo 2.3.
If you aren't using XenForo 2.3, you don't need to upgrade (might be some unmeasurable speed increase [think nanoseconds] when running its JavaScript since it doesn't dip into jQuery any longer).
By default XenForo relies on a browser being willing to subscribe to push notifications if the user previously granted permission. Safari (and iOS PWA) does not work that way, even a re-subscribe needs to be initiated by a user gesture (see this post). This causes iOS PWA (and desktop Safari browsers) to "lose" their push subscription since XenForo is relying on browsers to...
- Changed JavaScript to work regardless if XenForo core JavaScript is lazy loaded or not (2.3 compatibility)
Fixed issue where bringing the app to front wouldn't update counters in XenForo 2.3