Giter Site home page Giter Site logo

Comments (12)

deepakprabhakara avatar deepakprabhakara commented on June 6, 2024 2

@steven-tey That is a good point and a valid use case. We do know the tenant and should add that to requested attribute along with an indication that it came via idp login. We'll make the changes, cc: @niwsa

from jackson.

steven-tey avatar steven-tey commented on June 6, 2024 2

@deepakprabhakara can confirm that "@boxyhq/saml-jackson": "^1.11.3" fixes this issue! Thank you so much 🙏

CleanShot 2023-08-20 at 16 40 19@2x

from jackson.

deepakprabhakara avatar deepakprabhakara commented on June 6, 2024 1

Thanks @steven-tey, we are sorting it out at #1481 and I'll ping you as soon as it is merged and released.

from jackson.

deepakprabhakara avatar deepakprabhakara commented on June 6, 2024 1

@steven-tey Fixed in https://github.com/boxyhq/jackson/releases/tag/v1.11.3

from jackson.

niwsa avatar niwsa commented on June 6, 2024

@steven-tey Thanks for reporting this issue. We are looking into this and will let you know soon.

from jackson.

niwsa avatar niwsa commented on June 6, 2024

For the IdP login, since we depend on the Credentials Provider there is no separate profile being passed in from NextAuth. Instead, you can set the profile inside the user object returned from provider.authorize. This can then be accessed via user object inside signIn.

        // Fetch user info
        const userInfo = await oauthController.userInfo(access_token);

        if (!userInfo) {
          return null;
        }

        if (userInfo?.id && userInfo?.email) {
          return {
            id: userInfo.id,
            email: userInfo.email,
            name: [userInfo.firstName, userInfo.lastName].filter(Boolean).join(' '),
            image: null,
            profile: userInfo, // <--- Set profile here
          };
        }
  ...
       callbacks: {
          signIn: async ({ user, account, profile }) => {
                      const _profile = profile ?? user.profile
                      ...
                      })
   
        }
  ...

from jackson.

steven-tey avatar steven-tey commented on June 6, 2024

oh nice, that worked! however, the userInfo object returns the Profile object, with requested: null (when it should be returning requested: { tenant: string }). Is that intentional as well?

from jackson.

deepakprabhakara avatar deepakprabhakara commented on June 6, 2024

@steven-tey In the case of IdP there is nothing that was requested since the login is initiated from the Identity Provider. This is why we leave the requested attribute as null

from jackson.

steven-tey avatar steven-tey commented on June 6, 2024

@deepakprabhakara Got it, that makes sense! Does that mean that other than configuring SCIM directory sync, there is no way to make sure that the user gets linked to their respective team if they login directly from their Identity Provider for their first login?

from jackson.

steven-tey avatar steven-tey commented on June 6, 2024

@deepakprabhakara Awesome! LMK when it's ready – happy to test it out! :)

from jackson.

Related Issues (20)

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.