Skip to content
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

Task: [Backend] Verify the credentials upon submission, return verification error if they don't #94710

Closed
3 tasks done
Imran92 opened this issue Sep 19, 2024 · 1 comment
Closed
3 tasks done
Assignees
Labels
Automated Migration i4 [Feature] Site Migration Features related to site migrations to WPcom [Type] Task

Comments

@Imran92
Copy link
Contributor

Imran92 commented Sep 19, 2024

Details

This issue is only for the backend.

We can probably do it in two ways.

  1. Create an endpoint to verify that the credentials work
  2. Just add a new check in the current submission endpoint (/automated-migration) to make sure the creds work

I suggest we go with option 2 because otherwise we'll need to make two sequential calls for each submission, which will make it slow.

The background job already uses a function to login to the website. We will just reuse that function to login to the user's site. If the logging in doesn't work as expected, we'll return an error. Upon receiving this error, the frontend will show error messages and tell the user to recheck the credentials.

Checklist

  • Added credentials check in the endpoint
  • Add an optional param to override the credentials check
  • Returns proper error useable from the frontend to display error messages

Related

No response

@Imran92
Copy link
Contributor Author

Imran92 commented Sep 25, 2024

Diff published D162290-code

@Imran92 Imran92 closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automated Migration i4 [Feature] Site Migration Features related to site migrations to WPcom [Type] Task
Projects
None yet
Development

No branches or pull requests

2 participants
@Imran92 and others