Skip to content

Conversation

@rebornix
Copy link
Contributor

@rebornix rebornix commented Jul 4, 2022

Fix #651

This PR adds changes we need to allow the plugin to be runnable on macOS safari, which includes:

  • browser utility to check browser type (isChrome, isFirefox, isSafari)
  • Conditionally disable features which don't work on Safari
  • A new theme flat which fit better in Safari

@rebornix rebornix requested a review from Sneezry July 4, 2022 18:18
@Sneezry Sneezry requested a review from mymindstorm July 4, 2022 18:38
download="authenticator.txt"
:href="exportOneLineOtpAuthFile"
v-if="!unsupportedAccounts"
v-if="!unsupportedAccounts & isDataLinkSupported"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use blobl URLs (https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL) so that we can also enable backup feature on Safari?

Copy link
Contributor Author

@rebornix rebornix Jul 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately we don't have blob url support either on Safari, IIRC blob urls can't be opened.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only available on Safari for now is file download. I didn't figure out an approach for working around for other backup solutions yet.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sneezry
Copy link
Member

Sneezry commented Jul 4, 2022

I don't see the change for build script, do we need a new entry in build script for Safari web extension?

@rebornix
Copy link
Contributor Author

rebornix commented Jul 4, 2022

I don't see the change for build script, do we need a new entry in build script for Safari web extension?

@Sneezry We can reuse the chrome one since there aren't differences between compiling the extension for chromium and safari (exactly what Safari team aims for). The extension will behave differently at runtime.

@Sneezry Sneezry closed this Jul 5, 2022
@Sneezry Sneezry reopened this Jul 5, 2022
@Sneezry
Copy link
Member

Sneezry commented Jul 5, 2022

I don't see the change for build script, do we need a new entry in build script for Safari web extension?

@Sneezry We can reuse the chrome one since there aren't differences between compiling the extension for chromium and safari (exactly what Safari team aims for). The extension will behave differently at runtime.

Then how can we build the extension for Safari, does npm run chrome work?

@rebornix
Copy link
Contributor Author

rebornix commented Jul 5, 2022

Then how can we build the extension for Safari, does npm run chrome work?

@Sneezry Yes. Sorry that I didn't document how to test Safari. The steps would be

It's a pity that there is no hot reload. Let me know where is the best place for above steps, they can be documented in https://github.com/rebornix/Authen but it makes sense to me to have it in this project too.

@rebornix rebornix requested a review from Sneezry July 5, 2022 17:12
Copy link
Member

@Sneezry Sneezry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rebornix
Copy link
Contributor Author

rebornix commented Jul 8, 2022

@mymindstorm I would really appreciate your help if you can also take a look at this PR, thanks in advance!

@mymindstorm
Copy link
Member

Sorry about the delay, I'll get this reviewed by the end of today.

@mymindstorm
Copy link
Member

It's a pity that there is no hot reload. Let me know where is the best place for above steps, they can be documented in rebornix/Authen but it makes sense to me to have it in this project too.

Since this is the official safari port, how about we move rebornix/Authen into the Authenticator-Extension organization account, add the Safari build steps to @rebornix 's repository, and link to that from this repository?

@rebornix
Copy link
Contributor Author

If @Sneezry has no objection I can start moving my repo to this organization and then update the steps and links in this PR.

Copy link
Contributor Author

@rebornix rebornix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mymindstorm @Sneezry I have already moved the Safari wrapper repository into this org and updated the readme with links to its contribution/development steps. Please help take a look ;)

@Sneezry
Copy link
Member

Sneezry commented Jul 11, 2022

@mymindstorm @Sneezry I have already moved the Safari wrapper repository into this org and updated the readme with links to its contribution/development steps. Please help take a look ;)

Cool! The sub-module reference may need to update

@rebornix
Copy link
Contributor Author

@Sneezry good catch! Updated the git-submodule link and will update the commit once we merge this PR. Let me know if the PR is good for merge, thanks!

@rebornix rebornix requested a review from mymindstorm July 15, 2022 20:12
@rebornix rebornix merged commit 0d7f09a into Authenticator-Extension:dev Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS Safari Support

3 participants