Skip to content

[HOLD for payment 2023-09-04] Login - Can't sign in with Apple #25697

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

Closed
2 of 6 tasks
lanitochka17 opened this issue Aug 22, 2023 · 13 comments
Closed
2 of 6 tasks

[HOLD for payment 2023-09-04] Login - Can't sign in with Apple #25697

lanitochka17 opened this issue Aug 22, 2023 · 13 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 22, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue found when executing PR #23673

Action Performed:

  1. Go to staging.new.expensify.com
  2. Click on Apple icon logo
  3. Enter valid Apple ID and password
  4. If prompted, validate with 2 factor authentication
  5. Select "Share my email" and click on "Continue"

Expected Result:

he user should be able to log in with their Apple account

Actual Result:

The user is unable to log in with their Apple account

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • Windows / Chrome
  • MacOS / Desktop

Version Number: 1.3.56-0

Reproducible in staging?: Yes

Reproducible in production?: No

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug6173525_bandicam_2023-08-21_23-12-12-379.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Aug 22, 2023
@OSBotify
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@melvin-bot
Copy link

melvin-bot bot commented Aug 22, 2023

Triggered auto assignment to @yuwenmemon (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@yuwenmemon
Copy link
Contributor

@marcochavezf Can you take a look?

@lindboe
Copy link
Contributor

lindboe commented Aug 22, 2023

This is odd. I tried on staging and the response is that the idToken param is missing:

{"code":666,"jsonCode":666,"type":"Expensify\\Libs\\Error\\ExpError","UUID":"b2609074-dcf5-4513-86f1-575c3e51e90e","message":"Missing idToken when attempting to sign in via Apple.","title":"","data":[],"htmlMessage":"","onyxData":[],"requestID":"7faca0af19c72819-SEA"}

I'm not sure how that's happening. The idToken param is clearly in the API.write call: https://github.com/Expensify/App/blob/main/src/libs/actions/Session/index.js#L271, and we've had this working for a while locally now.

Currently spinning up an Android build (need to grab a token from Android to make the local web test work) so I can re-test locally to see if the error is occurring there.

Screenshot 2023-08-22 at 9 58 18 AM

@marcochavezf
Copy link
Contributor

Yeah this is weird, for some reason, the idToken is not included in the payload:

Screenshot 2023-08-22 at 11 08 03

@marcochavezf
Copy link
Contributor

Looking at the bundle file, seems the param in beginAppleSignIn is undefined:

Screenshot 2023-08-22 at 11 10 54

@marcochavezf
Copy link
Contributor

At the upper level, we're trying to get the id_token from the object detail, but it seems we'd need to get it from detail.authorization.id_token @lindboe

Screenshot 2023-08-22 at 11 13 16

@marcochavezf
Copy link
Contributor

marcochavezf commented Aug 22, 2023

I suppose it's coming from here, would be possible that the structure of the object changes in dev mode?

I think we should create some helper function to get the id_token, something like:

function getIDToken(event){
   return lodashGet(event.detail, 'authorization') ?  lodashGet(event.detail.authorization, 'id_token') : lodashGet(event.detail, 'id_token');
}

At least to fix the deploy blocker and we can check out later why the structure changes, what do you think @lindboe?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Aug 22, 2023
@amyevans
Copy link
Contributor

QA'ed the fix on staging and it passes ✅

Going to remove the deploy blocker label

@amyevans amyevans removed the DeployBlockerCash This issue or pull request should block deployment label Aug 23, 2023
@amyevans
Copy link
Contributor

Actually I guess we are all set to close

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 28, 2023
@melvin-bot melvin-bot bot changed the title Login - Can't sign in with Apple [HOLD for payment 2023-09-04] Login - Can't sign in with Apple Aug 28, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.57-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-09-04. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants