LibreOffice install in ChromeOS problem

I set up Linux yesterday on my Chromebook and then followed the Quick Setup instructions on the Flatpak website. I then tried to install LibreOffice using the command line. I did not copy the exact messages but it came back and said it needed to install something and I said yes. It then came back and again and said it needed something and I again answered yes. It then came back with the terminal prompt and said it needed a password. I tried my Chomebook password but that did not work. I ended up installing LibreOffice from another source.

I would like to use Flatpak apps in the future so can someone help me understand what went wrong?