Providing username values while importing users to Cognito

0

I'm using Cognito user pool created with Amplify. It requires e-mail sign-in and sign-up. Username parameter is automatically filled with sub value.

I'm using this username value as a unique id for Dynamo DB user table. I've selected username value as a unique id since sub values were assigned by Cognito system, we could not provide them. It's also explained in Cognito docs: "If your application doesn't require a user name, you don't need to ask users to provide one. Your app can create a unique username for users in the background. This can be useful if you want users to register and sign in with an email address and password." https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html

While importing users to new Cognito pool (same configuration with Amplify), I was hoping to copy the username values to cognito:username attributes of newly created users. But it didn't work like that, import job failed with "Username should be an email". Even when I provide email for username attribute, it's set as a random UUID.

I do not understand, how these users were created with usernames keeping sub (UUID) values, if it's not allowed? If they could be created with these values, why they can't be imported to a new user pool having exactly the same config, any idea?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠