FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. altear147
    3. Topics
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 14
    • Best 0
    • Controversial 0
    • Groups 0

    Topics created by altear147

    • A

      Solved How to setup OAuth properly

      Q&A
      • • • altear147
      23
      0
      Votes
      23
      Posts
      10.7k
      Views

      A

      @mark-robustelli

      Hello, sorry for away from this topic for a week due to my other ad hoc job,

      I've already solved this topic, it's not about setting on Fusionauth or google credential.

      but it's because I used google's client id on Fusionauth callback and
      after you told me to set applicationId in my Fusionauth admin then I used ApplicationId on google oauth's callback.

      that's why it kept return me client id is invalid.

      it was right under my nose, but I couldn't see it.

      Thank you for reply me, that's very helpful, It would take more time if you didn't help me.

    • A

      Unsolved Update user using ts SDK but the username is removed

      Q&A
      • • • altear147
      2
      0
      Votes
      2
      Posts
      883
      Views

      A

      @altear147 I encountered this behavior today when I tried to update the username for a user:

      await getFusionAuthClient(tenantId).updateUser(userId, { user: { username, }, });

      To my surprise (but probably only the lack of knowledge), this set theusername of the user as specified but also deleted the email just as you described.

      I was thinking, okay, let's move on and don't touch username and specify firstName as the only key for the update:

      await getFusionAuthClient(tenantId).updateUser(userId, { user: { firstName, }, });

      but then I received this error:
      16e0e85b-affe-4d49-be46-bf5a05f5d811-image.png

      Which I also didn't expect, since I assumed the userId uniquely identifies a user and I don't have to supply more fields to help FusionAuth identify it.

      After supplying the exact same things as you did:

      await getFusionAuthClient(tenantId).updateUser(userId, { user: { email: email as string, firstName: firstName as string, lastName: lastName as string, mobilePhone: mobilePhone as string, }, });

      my user object is getting updated. To clarify, the email input is disabled on my form, and users can only enter first name, last name, and mobile phone.

      You can find the complete code here: https://github.com/akoskm/saas/blob/main/app/routes/team_.%24userId.edit.tsx

      Hope this helps.