# Google Authenticator MFA

**URL:** <https://community.auth0.com/t/google-authenticator-mfa/29183>\
**Category:** Get Help\
**Tags:** mfa\
**Created:** [August 8, 2019, 12:50pm UTC](https://community.auth0.com/t/google-authenticator-mfa/29183 "2019-08-08T12:50:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwk180](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jwk180/32/12805_2.png) [@jwk180](https://community.auth0.com/u/jwk180)\
**Post date:** [August 8, 2019, 12:50pm UTC](https://community.auth0.com/t/google-authenticator-mfa/29183/1 "2019-08-08T12:50:25Z")

</div>

I’m trying to add MFA via Google Authenticator to a single-page web app, as well as iOS and Android mobile clients. All 3 of these are using the Lock login. When a user logs into the web app for the first time, a QR code appears that can then be scanned. If a user logs into the mobile app for the first time, no QR code is shown.

My question is, how are users supposed to enroll when using mobile? Obviously showing a QR code on mobile wouldn’t make sense, unless you had another device to scan it. Is there a way to programmatically open the Google Auth app and auto-enroll the user or something?

Help is appreciated!

---

<div class="post-metadata">

**Author:** ![alexander.elo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alexander.elo/32/13075_2.png) [@alexander.elo](https://community.auth0.com/u/alexander.elo)\
**Post date:** [August 8, 2019, 1:16pm UTC](https://community.auth0.com/t/google-authenticator-mfa/29183/2 "2019-08-08T13:16:28Z")

</div>

Would [something like this](https://github.com/google/google-authenticator/wiki/Key-Uri-Format) work?  
Edit: [It should at least on Android](https://github.com/google/google-authenticator-android/blob/efac95c88ef8d9f8be3c887fbcd2c2fdf4f45dbe/java/com/google/android/apps/authenticator/AndroidManifest.xml#L51)

---

<div class="post-metadata">

**Author:** ![jwk180](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jwk180/32/12805_2.png) [@jwk180](https://community.auth0.com/u/jwk180)\
**Post date:** [August 8, 2019, 1:43pm UTC](https://community.auth0.com/t/google-authenticator-mfa/29183/3 "2019-08-08T13:43:10Z")

</div>

The Google Auth source code?

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [August 8, 2019, 2:42pm UTC](https://community.auth0.com/t/google-authenticator-mfa/29183/4 "2019-08-08T14:42:52Z")

</div>

> Obviously showing a QR code on mobile wouldn’t make sense, unless you had another device to scan it.

There is a link “Trouble scanning” that allows to enter the code manually into the authenticator…

 ![04%20PM](https://global.discourse-cdn.com/auth0/original/2X/4/41b24082438a5565e39a8f8780e7482d6c77b321.png)

… on the next page, when clicked:

 ![08%20PM](https://global.discourse-cdn.com/auth0/original/2X/6/634721bd42068903d7b8ff6019aaebf23857ad45.png)

---

<div class="post-metadata">

**Author:** ![jwk180](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jwk180/32/12805_2.png) [@jwk180](https://community.auth0.com/u/jwk180)\
**Post date:** [August 8, 2019, 2:48pm UTC](https://community.auth0.com/t/google-authenticator-mfa/29183/5 "2019-08-08T14:48:44Z")

</div>

Thanks for the reply. That QR code does not show up with Lock embedded login on mobile, it just goes straight to the ‘Enter your one-time code’ screen.

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [August 8, 2019, 2:53pm UTC](https://community.auth0.com/t/google-authenticator-mfa/29183/6 "2019-08-08T14:53:12Z")

</div>

Ok I see, it’s the embedded Lock, not the Lock inside the Auth0 hosted page (so you’re not redirecting to Auth0 hosted page).  
In this case, you could use the Authentication API regarding MFA [https://auth0.com/docs/api/authentication#add-an-authenticator](https://auth0.com/docs/api/authentication#add-an-authenticator)

> Is there a way to programmatically open the Google Auth app and auto-enroll the user or something?

From a quick Google search, I don’t think it’s possible (i.e. on Android), as there’s no respective Intent available yet (at least, it’s an open issue for the Google Authenticator on Android).

> <https://stackoverflow.com/questions/32234378/intent-to-open-google-authenticator>

> <https://github.com/google/google-authenticator-android/issues/54>
>
> Hi guys!
> 
> How do you guys feel about add those 3 values (account name, key and t…ime based) through the intent from another app in EnterKeyActivity?
> 
> The thing is, I have all this values and I'd like to make the process to enable it easier. In this way the user will only need to tap \_ADD\_ button.

---

<div class="post-metadata">

**Author:** ![alexander.elo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alexander.elo/32/13075_2.png) [@alexander.elo](https://community.auth0.com/u/alexander.elo)\
**Post date:** [August 8, 2019, 4:39pm UTC](https://community.auth0.com/t/google-authenticator-mfa/29183/7 "2019-08-08T16:39:17Z")

</div>

No. If I understood correctly that you want to enroll user with a new MFA and add the key to the authenticator automatically thene read the linked wiki page about Key Uri Format. With that you are able to create an uri that client can open (or autoredirect the client). Opening that uri will open Google Authenticator app automatically and ask user if he/she wants to add your key.

I created a [simple web page](https://b1269f6c-1136-4f27-a458-3e400fafa806.htmlpasta.com/) to demonstrate this. Open it with a mobile device with installed Google Authenticator app. There is a link that should open Google Authenticator for you and ask for adding the key. It uses the same example uri found from the wiki: otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example

I verified this, works with at least Android 9 and Google Authenticator version 5. I don’t have iOS device to test this on it.

---

<div class="post-metadata">

**Author:** ![emiel](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/emiel/32/33674_2.png) [@emiel](https://community.auth0.com/u/emiel)\
**Post date:** [April 8, 2022, 10:39am UTC](https://community.auth0.com/t/google-authenticator-mfa/29183/8 "2022-04-08T10:39:51Z")

</div>

@alexander.elo considering this URI that you provided (`otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example`), is there a way to change the `issuer` parameter somewhere in Auth0 ?

If I’m not mistaken it’s currently using the name of your Auth0 Tenant. Inside our company we have different applications we need to support and as it turns out the _Google Authenticator_ does not allow you to change the name (check out [Cannot rename entries in iOS authenticator app](https://github.com/google/google-authenticator/issues/389) )

If we could control the `issuer` parameter on the `otpauth` URI that is generated by Auth0, we could create a more meaningful entry name for the end user.

Makes sense?

---

<div class="post-metadata">

**Author:** ![ahns](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ahns/32/59717_2.png) [@ahns](https://community.auth0.com/u/ahns)\
**Post date:** [May 15, 2025, 10:45pm UTC](https://community.auth0.com/t/google-authenticator-mfa/29183/9 "2025-05-15T22:45:12Z")

</div>

this would be helpful for us as well however because we utilize organizations in Auth0 the the issuer is actually the organization.display\_name.

If a user is part of their own organization why do they want the label in their authenticator app to say their own company name as the label. It should be showing the name of the application (ie tenant name) so they can identify that as the OTP code to use when challenged during login, or allow us to have full control over what the issuer is.
