Andrew Truckle
Andrew Truckle

Reputation: 19117

Does the Google API support the 2-Step Verification process?

I read about 2-Step Verification and it is not clear to me in the Google API's natively support this under the hood.

Upvotes: 3

Views: 2092

Answers (2)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 116978

When the user authenticates your application they are going to be shown the 2 factor if they have 2 factor enabled on their account.

There is no way for you to know that though. Google doesn't give us any information as to whether or not the user has 2 fa enabled on their account.

Upvotes: 3

m.rp
m.rp

Reputation: 748

I don't think that Google APIs offers out-of-the-box 2FA at the level of REST API calls. 2FA on the Google platform is only used at the level of user authentication, not API authentication, which is managed by OAuth 2.0.

What you can do if you are developing your own API backend is to attach a token generated by an authenticator, like Google Authenticator or Authy to the user id to every request to your API backend, in fact creating a 2FA for your API, the factors being the token and the id, obviously the token needs a proper timeout to be set and maybe additional properties. I don't know if the Google Authenticator platform lets you manage this things, the Authy developer platform, on the other hand, is more flexible.

This article as an example of doing something similar using Authy: https://developer.ibm.com/apiconnect/2017/06/08/secure-apis-two-factor-auth/

Upvotes: 2

Related Questions