Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Safari support #17

Open
kkostov opened this issue Dec 19, 2022 · 6 comments
Open

Adding Safari support #17

kkostov opened this issue Dec 19, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@kkostov
Copy link

kkostov commented Dec 19, 2022

Hey folks, in response to your toot https://infosec.exchange/@lartsch/109540360663111201 I'd love to try adding support for Safari!

Perhaps I could open an issue in the repo to keep track of the progress?

My first step will be to convert the extension using Xcode and check for compatibility issues that may need to be addressed.

Regarding distribution of the extension, I guess this can be done manually at first?

App Store distribution requires a developer program membership. One option is to publish it using mine, I'd be happy to do it, but that may not be the right solution. There are options to waiver the membership fee, but it's not without some paperwork 🙈 if a non-profit organization doesn't exist yet, https://developer.apple.com/support/membership-fee-waiver/.

@Lartsch
Copy link
Owner

Lartsch commented Dec 19, 2022

Hi Konstantin, thanks again for your involvement.

It would be no issue for me if it was published using your subscription. I think most Apple users like things to be simple and installing via store would be the most user-friendly option. As I do not want to setup a non-profit, the fee waiver is not an option for me right now (but it's good to know that this option exists).

If you prefer access to the repository to create your own branch over creating a fork (in case adjustments need to made for compatibility), please let me know.

When functionality is proven, we can think about a workflow for releases that works for you.

@Lartsch Lartsch added the enhancement New feature or request label Dec 19, 2022
@Lartsch Lartsch moved this to Todos (important to less important) in FediAct tracker Dec 19, 2022
@Lartsch Lartsch moved this from Todos (important to less important) to In Progress in FediAct tracker Dec 19, 2022
@telsin
Copy link

telsin commented Jan 5, 2023

@kkostov happy to help test if appropriate!

@kkostov
Copy link
Author

kkostov commented Jan 6, 2023

@telsin that's awesome! I'm slowly resuming after the holidays and plan to pick this up in the next couple of days.

@kkostov
Copy link
Author

kkostov commented Jan 12, 2023

I created a repository for the Xcode project and carried out the conversion 🎊 .

The extension converted without warnings and was ready for use “as is” on macOS! The pop-up also works (although some CSS changes may be needed).

Testing the extension with an actual server was not successful (yet) due to a CORS error kkostov/FediActSafari#1 - it seems Safari is validating CORS headers for requests from service workers.

Next, I will see if it's a Safari issue or intentional and if there are configuration options available to make it ignore CORS headers for the extension (otherwise it will need a whitelist of hosts in the manifest).

@kkostov
Copy link
Author

kkostov commented Jan 15, 2023

The CORS error was addressed by using the manifest for Firefox (v2).

However, fetchBearerToken() does not seem to fetch the access token. The value of text always comes back with "access_token": null":

Screenshot 2023-01-15 at 18 23 28

@Lartsch do you have any ideas as to what could be the cause of this?

I'm not sure when mastodon includes an access token in the page content, does it depend on cookies for the logged-in session?

@smiba
Copy link

smiba commented Jul 1, 2023

Would love to have a Safari version of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

4 participants