SMS messaging for two-factor authentication might become a thing of the past. A federal agency is discouraging its use.

The National Institute of Standards and Technology is pushing for the change. The latest draft of its Digital Authentication Guideline, updated on Monday, warns that SMS messages can be intercepted or redirected, making them vulnerable to hacking.

Many companies, including Twitter, Facebook and Google, as well as banks, already use the phone-based text messaging to add an extra layer of security to user accounts.

It works like this: To access the accounts, the user not only needs the password, but also a secret code sent by the company by text message. Ideally, these one-time passcodes are sent to a designated phone number to ensure no one else will read them.

But even so, hackers have still found ways to trick the system. In the past, they’ve used malware to infect smartphones, and secretly redirect the SMS messages to another device.

Others have chosen to impersonate their victims. This can allow the hacker to call up the phone company and ask them to reroute the SMS text messages to another phone number.

NIST also suggested that phone numbers connected to software-based services, including VoIP, could be vulnerable to hacking, putting the SMS messages at risk of being read.

The federal agency is instead recommending that the tech industry finds better alternatives. This can include still sending the one-time passcodes but through a secure smartphone app.

For example, Google already offers this feature with its Authenticator app, which will allow it to bypass the phone networks and generate a code directly on the smartphone.

It’s unclear how the tech industry might react to the federal agency’s proposal. But cybersecurity vendors are already coming up with ways to better secure user accounts and devices through fingerprint recognition, hardware tokens and other methods.

Keith Graham, CTO at SecureAuth, approved of NIST’s proposal. His company specializes in multi-factor authentication, and he said hackers are increasingly finding ways to target the passcodes contained in SMS messages.

“The days of vanilla two-factor approaches are no longer enough for security,” he said in an email.

However, SMS messaging for two-factor authentication is still a popular choice for companies wanting to secure their users’ accounts. “No other platform has the same level of ubiquity,” Kevin Panzavecchia, CTO of mobile network security provider HAUD, said in an email.

The vulnerabilities with the system could be fixed through mobile network firewalls that can filter out potential abuse, he added.

NIST is seeking public comment on its draft proposal.