fix: seed-admin emits $2y$ bcrypt prefix so Laravel admin login works (was $2a$ -> 500 'does not use the Bcrypt algorithm')
This commit is contained in:
@@ -40,6 +40,10 @@ func main() {
|
|||||||
fmt.Fprintln(os.Stderr, "hash:", err)
|
fmt.Fprintln(os.Stderr, "hash:", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
// Go's bcrypt emits "$2a$"; PHP/Laravel login requires "$2y$" (same
|
||||||
|
// algorithm, different marker). Rewrite the prefix so the admin can log
|
||||||
|
// into the Filament panel. Both Go and PHP verify either prefix.
|
||||||
|
hash = "$2y$" + hash[4:]
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
pool, err := pgxpool.New(ctx, dsn)
|
pool, err := pgxpool.New(ctx, dsn)
|
||||||
|
|||||||
BIN
frontend/seed-admin
Executable file
BIN
frontend/seed-admin
Executable file
Binary file not shown.
Reference in New Issue
Block a user