Create an endpoint to verify that the credentials work
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
[x] Added credentials check in the endpoint
[x] Add an optional param to override the credentials check
[x] Returns proper error useable from the frontend to display error messages
Details
This issue is only for the backend.
We can probably do it in two ways.
/automated-migration
) to make sure the creds workI 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
Related
No response