We are developing an app that uses Authentication Services to authenticate users. According to the documentation, this framework will open the default web browser if it supports auth session handling, and Safari otherwise. This is not entirely true, and users will be frustrated!
macOS version: Sequoia 15.5; Safari version: 18.5.
When:
The default browser is not Safari, and supports auth session handling (Google Chrome and Microsoft Edge as examples); and -
The Safari app is already running;
The auth flow will:
Present the confirmation dialog box with the default browser icon. Good!
Open a Safari window, instead of the default browser's one. Bad!
Respond with "User Cancelled" error to the app, after making the end user believe the auth was good. Very Bad!!
If the app retries the auth session, the default browser window will open as expected, and it will work as expected.
However, requiring users to authenticate twice is a very bad users experience...
This issue does not reproduce, when either:
Safari is not running at the moment of auth session start;
The default browser does not support auth session handling; or -
Safari is the default browser.
Fellow developers, be warned!
Apple engineers, feedback #18426939 is waiting for you.
Cheers!
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
We have a push notification mechanism using Firebase Cloud Messaging in an extension we have developed for other browsers. We ask for the notifications permission in the manifest.
However, this permission is not implemented in Safari, and Web Push API is not fully available in the context of an extension. I have submitted FB12039213 (Support Notifications in Safari Web Extensions).
How do we deliver notifications to a Safari Web Extension?
We have noticed that remote notifications with null in the JSON body are not delivered to our macOS app.
For example, when the JSON body of the remote notification is
{"aps":{"alert":"test"},"customData":null}
APNs endpoint responds with 200 OK, but the message is not received by the application via
- (void)application:(NSApplication *)application didReceiveRemoteNotification:(NSDictionary<NSString *,id> *)userInfo
This issue also reproduces with a JSON body like:
{"a":"b","c":{"d":"e","f":null}}
Please be advised to remove such fields from your messages.
In the meantime, I have submitted a feedback at FB12086979 (APNs not delivering messages with null in the body)
browser.scripting.registerContentScripts was introduced in Safari 16.4.
However, in Safari 16.6, we have just noticed that browser.scripting.registerContentScripts removes content scripts declared in the manifest (FB12817504).
Any work-arounds?