Bug in transfer_to code within User Migration
jimishjoban opened this issue · 0 comments
jimishjoban commented
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?