The Homebrew extension mas (Mac App Store command line interface), for automatic Apps install from the Mac App Store, won't recognize a successful App Store-authentication during setup.
Reason is the known issue and lacking support by the mas library itself, as tracked in the issue here:
Workaround
Note that mas will be successfully installed (if enabled), and hence can later be used in the Terminal to manually install Apps from the Mac App Store.