From 1d469c4ec975262b507a1b52429e29b0570f9f42 Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Mon, 21 Aug 2023 15:25:37 -0600 Subject: [PATCH] Document options for change password during a slow migration (#2477) * Capturing some knowledge that came up during a support discussion * minor formatting change --- site/docs/v1/tech/migration-guide/general.adoc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/site/docs/v1/tech/migration-guide/general.adoc b/site/docs/v1/tech/migration-guide/general.adoc index 2d1e8d077b..b6dc4b1e0b 100644 --- a/site/docs/v1/tech/migration-guide/general.adoc +++ b/site/docs/v1/tech/migration-guide/general.adoc @@ -618,7 +618,11 @@ The message displayed in the user interface when someone enters the "forgot pass There's an https://github.com/FusionAuth/fusionauth-issues/issues/895[open issue discussing how to improve this experience]. Please upvote or add any comments there. -Another option is to: +===== Other Options + +You have two other options in this case, both of which require integration work. + +You can look for failed logins. * Set up a webhook for link:/docs/v1/tech/events-webhooks/events/user-login-failed[failed login]. * Check to see if the email address exists in your legacy user data store. @@ -626,6 +630,13 @@ Another option is to: This will force the user to reset their password, which may be a surprise to them, but will let them continue to access their account without contacting customer service. If you pursue this option, make sure you consider the content of the Set Password email template. +You can a fire off an event to an API of your own when a user visits the forgot password page. + +* Write JavaScript code that runs on the forgot password page. Install it via a custom theme. The JavaScript can fire an event with the user's email to an API endpoint which you'd write. Fire this event whenever a user submits a 'forgot password' form. +* Have the API endpoint look up the user in the legacy system. If the user exists in the legacy system, query to see if they exist in FusionAuth. +* If they do not exist in FusionAuth but do in the legacy system, migrate the profile data. +* After they are migrated, trigger the link:/docs/v1/tech/apis/users#start-forgot-password-workflow[reset password email via FusionAuth API]. + ==== The Registration Use Case What happens when a user attempts to register for an application and you are in the middle of a slow migration? There are two scenarios: