Chatsong_ to use Flarum login inside of an iframe that's cross-domain, you need to change the security of the cookies.
If you can avoid an iframe, it will be more efficient, responsive and secure to use a subfolder or subdomain for Flarum.
If you really want to change the cookie security, see https://discuss.flarum.org/d/25592-cant-log-in-when-forum-is-shown-in-an-iframe/2 for how that can be done.
Where is the forum hosted though? If you're using a managed service like FreeFlarum, you likely won't be able to customize the cookies.