Skip to content

User.Identity.GetUserId() returns null #20

@nkirkes

Description

@nkirkes

Could be I'm doing something wrong in my configuration, but when I try to use this extension method, I get a null value returned. After peeking the definition of the method, it's trying to get the user id via the Claims collection for the user, for which there aren't any. The user has an _id value, but Claims is empty. Specifically, the method tries to find the NameIdentifier claim(which I thought was odd usage for that).

Have you seen this before? Any thoughts on what I could be doing wrong? Happy to elaborate if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions