-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix Apple Sign In token path #25710
Fix Apple Sign In token path #25710
Conversation
The `lodashGet` call was causing an error, saying webpack couldn't load the module, at least when used with ngrok. ``` Uncaught TypeError: lodash_get__WEBPACK_IMPORTED_MODULE_4___default()(...) is undefined lodashGet index.website.js:20 successListener index.website.js:57 ge appleid.auth.js:26 we appleid.auth.js:26 <anonymous> appleid.auth.js:26 <anonymous> appleid.auth.js:26 <anonymous> appleid.auth.js:26 EventListener.handleEvent* appleid.auth.js:26 ``` Remove the call so that it's more easily testable. Developers can override values just fine, and QA won't need it.
cefc840
to
89d0945
Compare
@allroundexperts Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
Hi @allroundexperts, sorry I will complete the checklist to merge it and CP it to staging since it's a straightforward fix |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Fix Apple Sign In token path (cherry picked from commit 7640a6f)
🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.3.56-11 🚀
|
✅ Verified the fix on staging following the CP |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.56-24 🚀
|
🚀 Deployed to staging by https://github.com/marcochavezf in version: 1.3.58-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.58-5 🚀
|
Details
Fixes the path where we access the Apple Sign-In token.
Also removes the lodashGet call from the success listener, as it was erroring when testing with ngrok:
Not sure why it's undefined, but we don't need it. Updated the contributing guide accordingly.
Fixed Issues
$ #25697
PROPOSAL: #25697 (comment)
Tests
This flow is only fully testable on staging, as it requires a configured HTTPS domain name matching Expensify's Apple configuration. In the meantime, we checked that the idToken param is selected correctly:
Session.beginAppleSignIn
(I was having issues with the debugger/console logging when running on ngrok, so I usedwindow.alert
, which worked well)idToken
is set as expectedSignInWithApple
command is sent with theidToken
form parameter in the browser inspectorOffline tests
n/a
QA Steps
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
Showing alert debug statement with token of appropriate length:
successfulwindowalert.mov
Showing idToken param in SignInWithAppleRequest:
showIdTokenParam.mov
We don't expect the request to succeed since it isn't signed appropriately for the Expensify API backend's configuration.
Mobile Web - Chrome
n/a
Mobile Web - Safari
n/a
Desktop
n/a
iOS
n/a
Android
n/a