Skip to content

Commit

Permalink
Fix supabase empty password migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
PineappleIOnic committed Oct 9, 2024
1 parent 7b2d40d commit bc59167
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/MigrationCLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function getSource(): Source
$_ENV['SOURCE_SUPABASE_TEST_ENDPOINT'],
$_ENV['SOURCE_SUPABASE_TEST_KEY'],
$_ENV['SOURCE_SUPABASE_TEST_HOST'],
$_ENV['SOURCE_SUPABASE_TEST_DATBASE_NAME'],
$_ENV['SOURCE_SUPABASE_TEST_DATABASE_NAME'],
$_ENV['SOURCE_SUPABASE_TEST_DATABASE_USER'],
$_ENV['SOURCE_SUPABASE_TEST_DATABASE_PASSWORD']
);
Expand Down
2 changes: 1 addition & 1 deletion src/Migration/Sources/Supabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private function exportUsers(int $batchSize): void
foreach ($users as $user) {
$hash = null;

if (array_key_exists('encrypted_password', $user)) {
if (array_key_exists('encrypted_password', $user) && ! empty($user['encrypted_password'])) {
$hash = new Hash($user['encrypted_password'], '', Hash::ALGORITHM_BCRYPT);
}

Expand Down

0 comments on commit bc59167

Please sign in to comment.