Base solution for your next web application
Open Closed

create custom authentication provider #6105


User avatar
0
thiqah created

please i need help :-

how i can create user without enter any password (text or random password) . shall i need to create custom authentication provider like (google and facebook) if yes how i can do this ? if Not necessary what is the solution ?

many thanks


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @thiqah

    Password field is required in ABP Framework, see https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Zero.Common/Authorization/Users/AbpUserBase.cs#L131.

    You can set a random password in the constructor of CreateOrUpdateUserInput class.

    But, I couldn't understand why you want to do this, could you explain a bit more detailed ?

  • User Avatar
    0
    thiqah created

    Hi @ismcagdas

    i actually thought before posting my question that the password wasn't required while logining through SSO and i needed local DB to add the user data from active directory and the admin won't add the passsword and then for login it will check username in local db after make sure that the user already exist in ACD ,i don't need password for any thing.

    the user won't be able to change the password also i already deleted change password from top bar and from create and update user but i have exception in add .

  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, you can set random password when creating such user. This is how abp/anz handles external authentication.

    https://github.com/aspnetboilerplate/aspnetboilerplate/blob/f3c49e26c09cc2acd8b9948296c74330004e7185/src/Abp.ZeroCore/Authorization/AbpLoginManager.cs#L307-L311