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)
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ