WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@LZoog
Copy link
Contributor

@LZoog LZoog commented Oct 21, 2024

Because:

  • We want to support this new 'sync optional' flow to allow users to sign into the browser without being signed into Sync, beginning with Relay

This commit:

  • Allows service=relay query param with our oauth flow
  • Adds logic to content-server reliers/fxa-settings integrations to check for this browser-but-not-Sync Relay case
  • Makes conditional email-first UX changes for service=relay
  • Makes conditional Signup UX changes for service=relay
  • Adjusts web channel messages for fxaLogin and fxaOAuthLogin, for signin and signup

closes FXA-10313, closes FXA-10377


This needs to be tested with latest Nightly (and then swapping service=sync with service=relay), see fxa-dev-launcher README with new (in this branch) Nightly command note for oauth desktop.

  • Testable through sign up, signin, signin with 2FA, signin token code
  • Also double checking that I didn't mess anything up with sync v3 desktop / regular oauth desktop would be nice 🙏 but I can make notes for QA on all this too.

- `FXA_DESKTOP_CONTEXT` - context value for the fxa-content-server: `context=[value]` (NOTE: `fx_desktop_v3` is default).

Tip: run `FXA_DESKTOP_CONTEXT=oauth_webchannel_v1 yarn firefox` to test the OAuth Desktop flow.
Tip: run `FXA_DESKTOP_CONTEXT=oauth_webchannel_v1 yarn firefox` to test the OAuth Desktop flow. Run `FXA_DESKTOP_CONTEXT=oauth_webchannel_v1 FIREFOX_BIN=/Applications/Firefox\ Nightly.app/Contents/MacOS/firefox yarn firefox` to test the OAuth Desktop flow (for MacOS) on Nightly.
Copy link
Contributor

Choose a reason for hiding this comment

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

If run from the fxa-dev-launcher, the command would instead be:

FXA_DESKTOP_CONTEXT=oauth_webchannel_v1 FIREFOX_BIN=/Applications/Firefox\ Nightly.app/Contents/MacOS/firefox yarn start

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, to run on local, will need to add FXA_ENV=local. Without it, the dev launcher was defaulting to prod

Copy link
Contributor Author

@LZoog LZoog Oct 22, 2024

Choose a reason for hiding this comment

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

Should I just put a note to run it from the root repo? I hardly ever run it directly in the package 😅 Using that command too, it seems to default to FXA_ENV=local.

edit: added a note to run that command from root

@LZoog LZoog force-pushed the FXA-10313 branch 2 times, most recently from 6622aa4 to 71de5e0 Compare October 22, 2024 21:45
Because:
* We want to support this new 'sync optional' flow to allow users to sign into the browser without being signed into Sync, beginning with Relay

This commit:
* Allows service=relay query param with our oauth flow
* Adds logic to content-server reliers/fxa-settings integrations to check for this browser-but-not-Sync Relay case
* Makes conditional email-first UX changes for service=relay
* Makes conditional Signup UX changes for service=relay
* Adjusts web channel messages for fxaLogin and fxaOAuthLogin, for signin and signup

closes FXA-10313, closes FXA-10377
@LZoog LZoog marked this pull request as ready for review October 22, 2024 22:28
@LZoog LZoog requested a review from a team as a code owner October 22, 2024 22:28
<Subject />
</AppLayout>
);
export const FancySuccess = () => (
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 reason this is included here is because I thought I was going to be implementing the UX in Figma for confirm signup code and wanted to see what this looked like, but that'll be done in a separate ticket.

- `FXA_DESKTOP_CONTEXT` - `context=` value. (NOTE: `fx_desktop_v2` is default).
- `FIREFOX_BIN=/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin npm start`
- `FIREFOX_DEBUGGER=true` - open the [Browser Toolbox](https://developer.mozilla.org/en-US/docs/Tools/Browser_Toolbox) on start (NOTE: `false` by default for speed).
- `FXA_DESKTOP_CONTEXT` - context value for the fxa-content-server: `context=[value]` (NOTE: `fx_desktop_v3` is default).
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to your patch directly but the property you are documenting: there is one other FXA_DESKTOP_CONTENT doc line for this property (line 10) which is incorrect and duplicated by this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will get this modified in another quick PR to avoid CI rerun here, thanks!

Copy link
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

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

@LZoog Code wise the LGTM, gonna do some local testing before r+

services: {
sync: {},
},
// OAuth desktop sync optional flow sends service in fxaOAuthLogin
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank for updating comments 👍🏽

@chenba
Copy link
Contributor

chenba commented Oct 23, 2024

👍 worked great when I tested manually.

Copy link
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

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

@LZoog Works well locally, thanks!

@LZoog LZoog merged commit 0973e18 into main Oct 23, 2024
6 checks passed
@LZoog LZoog deleted the FXA-10313 branch October 23, 2024 16:17
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.

7 participants