Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in transfer_to code within User Migration #21

Open
jimishjoban opened this issue Aug 12, 2024 · 0 comments
Open

Bug in transfer_to code within User Migration #21

jimishjoban opened this issue Aug 12, 2024 · 0 comments

Comments

@jimishjoban
Copy link

Hello,

We used transfer_to method on a database of 700k users and then transfer_from method always failed with invalid request

On closer reading of code, we figured a crucial BUG within this file

lib/apple_id/api/user_migration.rb

def transfer_to!(sub:, target:)
        resource_request do
          post(
            user_migration_endpoint,
            sub:           sub,
            target:        client.team_id,
            client_id:     client.identifier,
            client_secret: client.secret
          )
        end
      end

the target should NOT be client.team_id but rather should be target (argument passed)

We are also in a sticky situation now.. Since we realised that wrong transfer_sub was generated for all users due to above bug, should we re-generate the transfer_sub after fixing the code?

I dont know yet what are consequences of transferring users to 2 different teams. Any guidance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant