ayi authContext.login() causes “ Refused to display ‘login.microsoftonline.com…’ in a frame because it set ‘X-Frame-Options’ to ‘deny’ ”
ayi Microsoft does not allow its authentication dialog to open in an I-frame. It works fine in browser but MS Teams is implemented on I-frame, that is why you are getting this error. Please have a look into Microsoft Teams authentication flow for tabs flow. Here is a ink for Auth code sample