-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Update signInWithShortLivedToken to use API.Write instead of DeprecateAPI commands #13456
Conversation
@Beamanator 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] |
@NikkiWines think I should do a pre-review soon or wait for the Web-E PR to be merged? 🤔 |
@Beamanator reviewing would be good, thanks! The |
…recated-shortauthtoken-calls
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.
Another question that's pretty NAB: It looks like your renamed signInWithShortLivedToken
to be signInWithShortLivedAuthToken
(here you basically just added the Auth
term to the function name) but we still use the term shortLivedToken
a decent amount - in App and even in Web-E (ex: the param isLoggingInWithShortLivedToken
you're adding).
Do you think we should just leave this function name as signInWithShortLivedToken
to keep many terms consistent? OR am I missing some other reason for the rename?
(haven't tested yet, just initial review ^ so far looks pretty groovy! |
Oh, yeah, that's a fair point. I was thinking it would be clearer to have it be |
In the end it seems like we use both Do you have a preference on which to use? Happy to update both repos accordingly once we've decided. |
@iwiznia @Beamanator updated |
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.
I kinda like the shortLivedAuthToken
version better, since it's super clear it's a type of auth token instead of some other token.
I'm also approving b/c maybe this can be a follow-up PR iffffff you want - as you said, it would be nice to make it consistent in both repos eventually
Yeah, I think a follow-up PR would be good! I'll spin one up today. @iwiznia and @Beamanator could one of you fill out the PR reviewer checklist as well please? |
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.
LGTM!
* @param {String} data.email | ||
*/ | ||
function setSuccessfulSignInData(data) { | ||
PushNotification.register(data.accountID); |
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.
Yeah as long as the new accountID gets set on the session, the code @aimane-chnaif linked should register notifications.
@aimane-chnaif Will you be able to test this PR today? We're trying to close the loop ahead of the upcoming holidays. Thank you! |
yes, will be done in 2 hrs |
Sorry but there was a blocking here (429 too many requests error) so was not able to do in time. |
Still stuck on 429 error 429.mov |
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.
Tests well on both web and mWeb, when logged out or logged in with same account.
But app keeps loading forever (session expired) when already logged in with different account. It works fine on production (before this PR) so I think this should be addressed in this PR.
different.account.mov
…recated-shortauthtoken-calls
Oh yeah good call, investigating now |
Hmm, yeah, looks like in that case we somehow end up calling Looking more into it now |
Based on that last comment, I'm going to file this PR into the N7 project. It seems that we still have some sleuthing to do, and that makes the scope of what's still required unclear. The remainder of the API Unchained clean-up and follow-on refactors are happening there in any case. |
Does that mean it is getting deprioritized or are we still finishing it? |
We should finish it! That's mainly a categorization thing, doesn't really change the priority. |
…wDot with a different account
…nsure we remove the oldUser login + credentials before signing the new user in
Ok, @iwiznia @aimane-chnaif (not requiring @Beamanator for a re-review because he's OOO) this is updated and should (hopefully) be working as expected 🤞 Screen.Recording.2022-12-23.at.20.01.08.mov |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Safarimsafari.mov |
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.
LGTM and tests well both on Web and mWeb for all 3 cases of initial app logged in status (same user, different user, logged out).
@iwiznia Do you mind jumping into this review today. It's C+ approved and also blocks something else that you're working on, so let's get it merged and deployed this week. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
🚀 Deployed to production by @chiragsalian in version: 1.2.44-0 🚀
|
Details
Replaces some deprecated API calls with updated commands.
cc: @iwiznia since you reviewed https://github.com/Expensify/Web-Expensify/pull/35791
Held on https://github.com/Expensify/Web-Expensify/pull/35791
Fixed Issues
$ Tied to https://github.com/Expensify/Expensify/issues/211669
Tests
/pricing
page on oldDot and selectedFree
Offline tests
N/A This action can only be taken while online. If you try this while offline in oldDot you get the following error:
QA Steps
/pricing
page on oldDot and selectedFree
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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.Screenshots/Videos
AFAIK this can only be tested on web. The last PR that updated this logic (#8855) doesn't appear to have platform-specific tests.
Web
Screen.Recording.2022-12-09.at.16.44.58.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android