-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Apple & Google Sign In #23673
Apple & Google Sign In #23673
Conversation
Yeah! @situchan it's pretty easy to get your authToken and agent up and running. Here's the explanation on their site: https://dashboard.ngrok.com/get-started/setup - Once you login they list through the steps of setting it up and running the agent. |
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
@marcochavezf are there any other checks we need to do to get this through? Also, just to clarify. I'm going to create an issue preemptively for the Bug4 (COOP error likely from Google's GSI), were there any other errors that should have issues created to track? I know we solved the white background issue on dev by hiding the buttons on dev. |
We're just tracking the issue here, we can link the bug4 there |
@marcochavezf We should test web based platforms after deploy to staging, right? |
Yes, given the limitations to testing localhost in both platforms, I'm going to merge it to include it in today's deployment and test properly the remaining parts on staging |
@marcochavezf just to make sure I'm on the same page. Link the conversation about bug4 in the tracking issue, or create a new issue about bug4 and link that in the tracking issue? |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Ah sorry for the confusion @cdanwards, let's create a new issue for bug4 and link it to the tracking issue please |
@marcochavezf no worries! Just wanted to make sure I understood. I'll get that issue created! |
🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.3.56-0 🚀
|
Hi all! See the above deploy blocker - #25768 - Can we look into why that Google sign in button jumps on desktop Safari? Thanks! |
@dangrous Hey! I'm taking a look at this! We mainly tested on Chrome and Brave browsers during development and I haven't been able to reproduce there (We were informed that Firefox wasn't supported). Is Safari one of the supported browsers? It definitely seems like an issue of the iframe rendering and possible re-rendering the button and the styles being updated on a millisecond delay. |
Yeah that's what I was thinking too. I wonder if we will need to apply the styles/width/height to an empty element and then replace it with the Google button when it's loaded, or something? As for browsers, I'm confirming in Slack but it looks like Safari was on our QA test list so it seems like yes. EDIT: confirmed, we support Safari |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
setHasShownPrompt(true); | ||
} else { | ||
// Navigation state is not set up yet, we're unsure if we should show the deep link prompt or not | ||
if (currentScreen === undefined || isAuthenticated === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this context, why would we use isAuthenticated === false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @cdanwards
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@napster125 We don't want to show the deeplink prompt to unauthenticated users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's discussion of it within this feature's design document. Trying to find if we included that conversation in the contributing guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following up, here are the slack threads where this was discussed:
https://expensify.slack.com/archives/C01GTK53T8Q/p1683070404415199
https://expensify.slack.com/archives/C01GTK53T8Q/p1689886614735019
Google sign-in uses a system theme and adjusts coloring accordingly. We didn't handle the color scheme for this which caused a white background on the G-sign button. #25638 |
if (!isMacOSWeb() || isUnsupportedDeeplinkRoute || CONFIG.ENVIRONMENT === CONST.ENVIRONMENT.DEV || hasShownPrompt) { | ||
return; | ||
} | ||
// We want to show the prompt immediately if the user is already authenticated. | ||
// Otherwise, we want to wait until the navigation state is set up | ||
// and we know the user is on a screen that supports deeplinks. | ||
if (isAuthenticated) { | ||
promptToOpenInDesktopApp(); | ||
setHasShownPrompt(true); | ||
} else { | ||
// Navigation state is not set up yet, we're unsure if we should show the deep link prompt or not | ||
if (currentScreen === undefined || isAuthenticated === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These conditions did not consider opening magic link on logged in user, and caused this issue #32795
Details
Fixed Issues
$ #7079
NOTE: Reading through
contributingGuides/APPLE_GOOGLE_SIGNIN.md
provides more details about testing in development as well as rationale for design decisions.Tests
Apple Sign In
iOS
Android
Web
Desktop
new.expensify.com/sign-in-with-apple
(It will automatically redirect to home login because of redirects)staging.new.expensify.com/sign-in-with-apple
Continue with Apple
button.Google Sign In
iOS
Android
Web
Desktop
new.expensify.com/sign-in-with-google
(It will automatically redirect to home login because of redirects)staging.new.expensify.com/sign-in-with-google
Continue with Google
button.Offline tests
Feature is not available in offline mode
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Apple:
Apple.Web.Flow_LowRes.mp4
Google:
Google.Web.Flow_LowRes.mp4
Mobile Web - Chrome
Chrome.Mobile.Web_LowRes.mp4
Mobile Web - Safari
Safari.Mobile.Web_LowRes.mp4
Desktop
Apple:
Apple.Desktop.w.Redirect_LowRes.mp4
Google:
Google.Desktop.w.Redirect_LowRes.mp4
iOS
IOS_LowRes.mp4
Android
Android_LowRes.mp4