Aktivity „yasin.hallak.89@gmail.com“

Odpoveď

hi

Please try to compare the code of the two projects first, mainly module dependencies.

I tried again removed IdentityServer without installed module "Volo.Account" .. it works well ...

We do not need to add module Volo.Account in commercial project because causes conflict with module Volo.Account.Pro..

I think IdentityServer does not removed becasue when I signIn and do Inspect in devTool it gave me

Odpoveď

hi

Please try to compare the code of the two projects first, mainly module dependencies.

I tried again removed IdentityServer without installed module "Volo.Account" .. it works well ...

We do not need to add module Volo.Account in commercial project because causes conflict with module Volo.Account.Pro..

Odpoveď

Can you create a template project and add your custom code then share it? liming.ma@volosoft.com

I created new project and remove identityServer it works well .. but in myProject does not work because when I Installed module "Volo.Account" ...it added in all projects and it causes conflict with another modules ... but when i installed in new project just added to newPorject.web proj ..

can you contact me with zoom and see my code and what is problems

Odpoveď

The video has an example. Did you check?

https://github.com/antosubash/AuthChange

i chekcd it but there is diffrences ... this project default abp but my project commercial abp ...

Odpoveď

Can you share the video url?

https://www.youtube.com/watch?v=6By_lKDyTGg

Odpoveď

hi

  • Steps to reproduce the issue:"

I want to remove IdentityServer ....

I watch video for brother Anto Subash and follow all steps ...

finaly gave me this error above

Hi,

Can you try this:

protected IOptions<IdentityOptions> IdentityOptions { get; } 
 
public xxx(IOptions<IdentityOptions> identityOptions) 
{ 
   IdentityOptions = identityOptions; 
} 
 
public virtual async Task CreateAsync(EmployeeCreateDto input) 
{ 
    await IdentityOptions.SetAsync(); // this line 
    
    var email = input.Email ?? $"{input.IdentityNo}@gmail.com"; 
 
    var user = new IdentityUser(Guid.NewGuid(), input.IdentityNo, email, CurrentTenant.Id); 
    user.Surname = input.Name; 
    var result = await _userManager.CreateAsync(user, "123456"); 
    if (!result.Succeeded) 
    { 
        throw new UserFriendlyException(@L["Validation:ErrorInServer"]); 
    } 
 
    var employee = ObjectMapper.Map(input); 
    employee.TenantId = CurrentTenant.Id; 
    employee.AppUserId = user.Id; 
    employee.BirthDate = input.BirthDate.ToDate().Value; 
    employee.IdentityDate=input.IdentityDate.ToDate().Value;     
    employee = await _employeeRepository.InsertAsync(employee, autoSave: true); 
    return ObjectMapper.Map(employee); 
} 

thank a lot it works well ...

I will repeat reproduce my problem

I want to create user and take Id and use it in my entity Employee as below :

public virtual async Task<EmployeeDto> CreateAsync(EmployeeCreateDto input)
{
   
    var email = input.Email ?? $"{input.IdentityNo}@gmail.com";

    var user = new IdentityUser(Guid.NewGuid(), input.IdentityNo, email, CurrentTenant.Id);
    user.Surname = input.Name;
    var result = await _userManager.CreateAsync(user, "123456");
    if (!result.Succeeded)
    {
        throw new UserFriendlyException(@L["Validation:ErrorInServer"]);
    }

    var employee = ObjectMapper.Map<EmployeeCreateDto, Employee>(input);
    employee.TenantId = CurrentTenant.Id;
    employee.AppUserId = user.Id;
    employee.BirthDate = input.BirthDate.ToDate().Value;
    employee.IdentityDate=input.IdentityDate.ToDate().Value;    
    employee = await _employeeRepository.InsertAsync(employee, autoSave: true);
    return ObjectMapper.Map<Employee, EmployeeDto>(employee);
}

I set password digit only and set in password setting "Required Digit Only " as below :

it does not work and give me error as below :

I hope to be reproduce my problem well .. thanks

I could not reproduce the problem

Can you provide steps that I can reproduce the problem? thanks.

I wrote above steps for my problem .. I need to create user from code and set passwrod only digit as figure above

Sorry, my bad, I thought you were using version 5.3.0, let me check it.

I am sorry my bad ..not your bad ... I was writing V 5.3.0

Zobrazených 51 až 60 z 83 záznamov
Made with ❤️ on ABP v8.2.0-preview Updated on marca 25, 2024, 15:11