FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Username and email claims aren't *both* honoured for identity providers

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    2
    2
    445
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chris 2
      last edited by

      If you setup an identity provider (samlv2 or oidc, not sure about others) you can specify a email and username claim. Then you can use these claims to link to (or create) the user. So far so good. Unfortunately fusionauth ignores the claim which it isn't linking on. So if you link by username it won't fill in the email field (and vice versa). This would be fine if you were able to set that field in the lambda, but its blocked there. This is troublesome for migrating from email linking to username linking and using any email features when linking by username.

      Its possbile i've missed a configuration step but I can see from the debugging output that it is reading the username when linking on email for instance, its just not setting it. Any thoughts?

      I am on fusion 1.45.1.

      danD 1 Reply Last reply Reply Quote 1
      • danD
        dan @chris 2
        last edited by

        Hiya @chris-2,

        So you'd like to have the claim that is not linked be set if present in the response? Would that solve your problem? Or is there some other solution that would solve your needs?

        The reason we don't allow those claims to be changed in the lambda is that it's an escalation possibility.

        One option (for a subset of your use cases) would be to store the value that is delivered from the identity provider in the user.data.email claim which is used for email specific functionality when no email address is available on the user.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • First post
          Last post