Giter Club home page Giter Club logo

identitycosmosdb's Introduction

identitycosmosdb's People

Contributors

dependabot[bot] avatar dlmelendez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

identitycosmosdb's Issues

AddToRoleAsync throw "Role X does not Exist"

I tried to add a Role to the user during Registration using

await _userManager.AddToRoleAsync(user, "Admin");

but an exception is thrown "The role Admin does not exist".

Any docs on how to add a role?
Thanks

How to implement RoleManager/IdentityRole

I have been able to successfully implement you solution for identity users but I am not able to get identity roles to work. Do you have any samples/documentation on how to implement roles with cosmos DB?

[Question] New instance of DocumentClient for non-Identity related queries?

Hello David,

Thanks for great library. I just started a new DocumentDB-based project and I didn't want to hang a SQL database just for authentication/authorization.

This is probably a silly question, but it has puzzling me for a while, as I'm not very experienced with the .NET architecture (I'm coming from Python projects).

I see that the IdentityCloudContext class exposes a Client property, which is an instance of DocumentClient. Also, I have an ApplicationDbContext class that expands the IdentityCloudContext, as the documentation suggests.

Then, my question is: Can (should?) I use my ApplicationDbContext class to handle tasks that are not related to identity? (say.. query/insert/update "products"). If yes, how can I do that? I believe that I should wrap this class in a Singleton or something similar.

Or should I create a different class with a different instance of DocumentClient to handle those requests?

Thank you so much in advance!

Cheers!

JsonPropery attribute ignored when generating SQL via LINQ

Hi and thanks for this great library :)

I have problems using LINQ to filter(.Where) and project(.Select) on the Users collection exposed byt UserManger class.

I can see that "ElCamino.AspNetCore.Identity.DocumentDB.Model.IdentityUser" is decorated with
[JsonObject(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
also all of its properties are decorated with
[JsonProperty("camelCasePropertyName")]

But for some reason those attributes are ignored during SQL generation.

As a workaround I can override the properties I need to access in my ApplicationUser class(Inherits from "ElCamino.AspNetCore.Identity.DocumentDB.Model.IdentityUser") and decorate with the same JsonProperty attribute providing the same Property name (PascalCase).

I guess there was a reason for you to add those JsonProperty attributes in the first place, but currently it just doesn't work.
Steps to reproduce. Just add the following lines in an test action in the Account controller in the "samplecore2.mvc" available in this repository.
var userDBquery = _userManager.Users .Where(u => u.Id == id);

The generated SQL query will filter on "Id" (capital first letter). The same behavior if you use .Select LINQ extension method.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.