How to use preferred username to login a user?

0

I am trying to use forcealiasatribute by which user can login through preferred username. Email is the only attribute required for sign up but in Amplify.Auth.SignUp() it is asking for username.But I want that username should be a random "sub"(example:"151af027-eede-423f-b17e-3d94908717s2"). Now(This is happening):

  1. Username: entered through Amplify.Auth.SignUp() function and it must be unique.(I want this should be a random string like below sub and not entered by user)
  2. Sub: 151af027-eede-423f-b17e-3d94908717s2 it is also unique.
  3. Preferred username: updated through attribute update function it is also unique. I WANT THIS:
  4. Username:151af027-eede-423f-b17e-3d94908717s2
  5. Preferred username: updated through attribute update function(it should be unique)
답변 없음

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

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

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

관련 콘텐츠