Closed DragonMastery closed 5 years ago
Hi @DragonMastery, could you please review this documentation and let us know if you need further guidance around this?
Well, to be honest the documentation does not help very much with explaining how the Role Service works. So I read through the source code and now I get it. You are using Cognito Groups as Roles. It would be nice if that were a little more clarified somewhere, because I really did not get that until I read through the source code. It might help if it were expanded on in HERE In essence the Roles have nothing to do with the ApplicationDbContext because the are not stored in the database.
Any reason why you are mentioning ApplicationDbContext? We don't use it anymore in this library.
Here is how we use Roles in this library:
https://github.com/aws/aws-aspnet-cognito-identity-provider/blob/master/docs/7-User%20Roles.md
Roles are just mapped to a group you create in cognito.
Thats literally what I just wrote.... with the same link... and to answer your question, your sample has it: https://github.com/aws/aws-aspnet-cognito-identity-provider/blob/master/samples/Samples/Data/ApplicationDbContext.cs
Yes, the sample has the old EF code, but it is swapped with the Cognito access layer.
Thanks for the feedback, made it more clear on the docs.
I will close this, let me now if you still have questions.
How exactly do I set my project up so that CognitoRole works? Specifically the ApplicationDbContext....