Import Users to Cognito from Wordpress Mysql database

0

My client wants to incorporate cognito SSO in various websites in Wordpress and Magento. I have already configured the SSO configuration for new users in these websites using plugin. I wanted to know how can I migrate the existing users from (for eg.) Wordpress to cognito.

I have gone through this post wherein it is explained that we can use a " user migration Lambda trigger" to get the user details from external user db to cognito.

I wanted to know how we can do this for Wordpress mysql db where in the passwords are setup in hash format. basically how to authenticate the user with your existing user db (instead of directory service).

1 個回答
0

Hi, there are basically two ways to migrate existing users into Cognito User Pools:

  1. Batch Import This is done by uploading a .csv file that contains user profile data. Everything except passwords can be imported because, as you noted, the passwords are (hopefully) stored encrypted. Since Cognito User Pools does not has a password stored, that means that users have to reset their passwords following the Forgot Password flow. This method is easier to implement and a good fit if you and your users are ok with resetting their passwords and you want to shut down your existing systems as soon as you migrated to Cognito User Pools.

  2. One-at-a-time user migration This migration method does not require your user to reset their passwords, but require your existing system to stay online until all or most users are migrated to Cognito User Pools. You can see statistics in the Amazon Cognito User Pools Console. The way it works is, your users use the Cognito User Pool to sign-in, if that fails, Cognito uses your existing system with the same given credentials to sign-in, if that is successful, Cognito will get the user information from your existing system and will store it along with the entered password (of course in encrypted form) into the Cognito User Pool. At this point the user is fully migrated and the next login will be successful directly via User Pool. This chart describes the flow of the One-at-a-time User Migration: Enter image description here

You can read more at the blog post which is also linked in your mentioned re:Post answer.

profile pictureAWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南