how to design implementation of oauth2 in reactjs with multiple api and different methods?

I want to implement oauth2 in my frontend and the problem is that I want (project manager wants ) to extract an abstraction to use it in the other componenet and services and implement differences of each providers in a file or package alone to possibly add in the future a new provider and new methods So can anyone help me to solve this problem and design a good solution
Sorry for my english and Thanks

Professional Website development and design for $50

Sir we are a team and having experience of six years and expects in website development and design and hope me my work is fully satisfied trust me sir thank youSir we are a team and having experience of six years and expects in website development and design and hope me my work is fully satisfied trust me sir thank you

by: Narahari66
Created: —
Category: Programming
Viewed: 165


Professional Website development and design for $50

Sir we are a team and having experience of six years and expects in website development and design and hope me my work is fully satisfied trust me sir thank youSir we are a team and having experience of six years and expects in website development and design and hope me my work is fully satisfied trust me sir thank you

by: Narahari66
Created: —
Category: Programming
Viewed: 146


Professional Android development and design for $60

Sir we are a team and having experience of six years and expects in Android development and design and hope me my work is fully satisfied trust me sir thank youSir we are a team and having experience of six years and expects in website development and design and hope me my work is fully satisfied trust me sir thank you

by: Narahari66
Created: —
Category: Programming
Viewed: 135


Modeling the Aggregates in the following Bounded Context – Domain Driven Design

enter image description here

I’m currently developing an application in ASP.NET Core 2.2 with Domain Driven Design. What you see in here is a Unit Creation page.

A Unit is composed of competences. A unit must have at least one competence and its name must not be in blank.

A Competence must have a descriptor, at least one indicator, and three evidence (one of the types shown above).

Once inserted into the DB, they’re read by another Bounded Context which is called evaluations.

Competences, Indicators, and Evidence need to have Ids (They’re going to become Entities) since they will be need to be fetched individually and referenced for a further evaluation operation.

Competences, Indicators, and evidences are all used separately in another bounded context called “Evaluation”.

I’m looking for some feedback on how I structured these aggregates (They are simple), and if the Evidence, Indicators, and Competences are OK to be entities instead of value objects, considering that for “Unit Bounded Context” (The one shown above) doesn’t necessarily view them as entities (It operates them all as part of the unit). But then, the “Evaluation Bounded Context” does see them as Entities.

I’m modeling them like entities so I can insert in the data store the right Ids and references immediately (Even though they are separate Bounded Context they all share the same data store).

Here are the aggregates so far (I haven’t finished adding the domain logic)

public class Unit     {         public UnitId Id { get; private set; }         public string Name { get; private set; }         public List<Competence> Competences { get; private set; }           public Unit(UnitId Id, string Name, List<Competence> Competences)         {             Validate.AssertArgumentNotEmpty(Name, "Name cannot be blank");             Validate.AssertArgumentNotNull(Competences, "Competences can't be null");             Validate.AssertArgumentEnumarationNotEmpty(Competences, "There must be at least one Competence");              Name = Name;             Competences = Competences;          }      }   public class Competence     {         public CompetenceId Id { get; set; }         public string Descriptor { get; set; }         public string Name { get; set; }         public List<Indicator> Indicatores { get; set; }         public List<Evidence> Evidences { get; set; }          /// <summary>         /// When the Competence is created, a new "CompetenceCreatedEvent" shall be dispatched that needs         /// to be read by the message broker and get it to the other bounded context so it can be read.         /// </summary>         /// <param name="id"></param>         /// <param name="Name"></param>         /// <param name="descriptor"></param>         public Competence(CompetenceId id, string Name,  string descriptor, List<Indicator> Indicatores, List<Evidence> Evidences)         {             Validate.AssertArgumentNotEmpty(Name, "Name can't be blank");             Validate.AssertArgumentNotEmpty(descriptor, "Descriptor can't be empty or null");             Validate.AssertArgumentNotNull(Indicatores, "Indicatores can't be empty");             Validate.AssertArgumentNotNull(Evidences, "Evidences can't be empty");             Validate.AssertArgumentEnumarationNotEmpty(Indicatores, "Indicatores can't be empty");             Validate.AssertArgumentEnumarationNotEmpty(Evidences, "Evidences can't be empty");              Indicatores = Indicatores;             Evidences = Evidences;              CheckThatEachEvidenceTypeIsPresent();           }           private void CheckThatEachEvidenceTypeIsPresent()         {             var allEvidencesArePresent =              Evidences.Any(x => x.TipoEvidence == TipoEvidence.Conocimiento) &&             Evidences.Any(x => x.TipoEvidence == TipoEvidence.Desmepeno) &&             Evidences.Any(x => x.TipoEvidence == TipoEvidence.Producto);              if (!allEvidencesArePresent)             {                 throw new NotAllEvidencesArePresent();             }          }       }   public class Evidence     {         public string Id { get; set; }         public string IstrumentId { get; set; }         public string Description { get; set; }         public TypeEvidence TypeEvidence { get; set; }          public Evidence(string id, string instrumentId, string Description, TypeEvidence typeEvidence)         {             Validate.AssertArgumentNotEmpty(Description, "Description can't be empty");             Validate.AssertArgumentNotEmpty(instrumentId, "instrumentId can't be empty");              Id = id ?? Guid.NewGuid().ToString();             InstrumentId = instrumentId;             Description = Description;             TypeEvidence = TypeEvidence;         }      }      /**  * In a true DDD scenario, in this bounded context,  * Indicator would be a Value Object. A domain event would be published  * once the Indicator has been created that would automatically   * create an entity in another bounded context. "It would duplicate the data".  * **/     public class Indicator : IAggregate     {         public Guid Key { get; private set; }         public string Description { get; set; }          public Indicator(string Description)         {             Validate.AssertArgumentNotEmpty(Description, "Description can't be empty");          }      } 

I need some helps verifying the aggregates’ structure. In addition, I have some concerns:

  • Rephrasing what I said above: A unit is the aggregate root that’s going to be saved (They work together in a transaction). That’s why it has nested all those other aggregates. Right now, they are modeled as Entities, but I also think that in this bounded context they could potentially be modeled as Value Objects instead. Since the “Evaluation Bounded Context” is the one that needs to have them referenced. Therefore, the approach would be that once the Unit is created or modified, an Event is fired that communicates with the other bounded context, and the other bounded context is the one who performs the… Would this be the right approach? Or could I model it as an Entity from the Unit bounded context? (I understand that’s a domain question, I just don’t want to be adding additional layers of complexity for no special reason)

  • From this question that I asked, is it OK for me to pass the Event Bus via a dependency in the needed aggregates?

Chrome extension installation process design

Currently I am trying to program a Chrome extension, these are written in javascript. I have only used javascript on webpages and I am in a bit of a situation with having long functions. After installing a Chrome extension I require user input 2 times. Before, in between and after the user inputs I am executing different parts of code. To prevent callback hell I started using but this has ended up in a big mess. This is the current program flow after installing:

Begin installation process

event function function event function require user input event function event function event function event function require user input event function event function 

End installation process

As you can see before the chrome extension is properly installed I have called about 10 functions and raised 10 events. This is a huge mess, but I do not see a way to fix this. The installation process has to finnish before a user can use the chrome extension. Whenever an exception is raised it is handled and the user will start over again. Do you see any way to fix this? I can provide code if needed but it is quite a lot.

Edit I believe my question might not be clear enough. I basically have a waterfall in my code. My chrome extension requires the user to go through a setup process before being able to use the application. This installation/setup process is displayed above and consists of functions emitting events after they are done which call other functions which emit events again. This can be seen as a waterfall. Every function also needs to finnish before the execution of the next

The Difference Between UX and UI Design

We’ve all overheard conversations, walking down hip streets of the world’s tech capitals, discussions about the great ‘UX’ of a product, or the poor ‘UI’ of a website. Is it a secret language you will never be privy to? Are these people just using slang to look cool?

Well, ok probably yes to the latter, but a determinate NO to the rest. Read on to learn what these terms mean, which jobs are better paid, and how to become a UX designer or UI designer.

Scroll to the middle of the post to…

The Difference Between UX and UI Design

How could I design a homebrew god and holy symbol? [on hold]

One of my players is playing a Blood Hunter from the D&D beyond site. He wants to have his character be the Ghost Hunter based subclass and have his backstory be that he grew up in a ghost hunting family/group Who all worshiped or looked to one or two gods. I’m just drawing a blank on designing such a god and associated holy symbol. What could a holy symbol be like for that kind of thing?