# Enable MFA(Multi Factor Authentication) using OAuth Generic OIDC

**URL:** <https://discourse.jupyter.org/t/enable-mfa-multi-factor-authentication-using-oauth-generic-oidc/17907>\
**Category:** JupyterHub\
**Created:** [February 9, 2023, 7:53pm UTC](https://discourse.jupyter.org/t/enable-mfa-multi-factor-authentication-using-oauth-generic-oidc/17907 "2023-02-09T19:53:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhanabalan13](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@dhanabalan13](https://discourse.jupyter.org/u/dhanabalan13)\
**Post date:** [February 9, 2023, 7:53pm UTC](https://discourse.jupyter.org/t/enable-mfa-multi-factor-authentication-using-oauth-generic-oidc/17907/1 "2023-02-09T19:53:42Z")

</div>

We are trying to enable MFA in our environment, we have our own OAuth Provider and they are using Generic OIDC OAuth, I received all the secret and endpoints, this is what I updated in our /etc/jupyter/jupyterhub\_config.py and restart jupyterhub, the service fails after restart. Not sure below configuration is accurate. Can somebody help?

c.JupyterHub.authenticator\_class = ‘oauthenticator.generic.GenericOAuthenticator’  
c.GenericOAuthenticator.oauth\_callback\_url = ‘https://\<jupyterhub\_url\>/hub/oauth\_callback’  
c.GenericOAuthenticator.client\_id = ‘xxxxxxxxxx’  
c.GenericOAuthenticator.client\_secret = ‘yyyyyyyyyyyy’  
c.GenericOAuthenticator.token\_url = ‘https://\<provider\_url\>/auth/oauth/v2/token’  
c.GenericOAuthenticator.userdata\_url = ‘https://\<provider\_url\>/openid/connect/v1/userinfo’  
c.GenericOAuthenticator.userdata\_method = ‘GET’  
c.GenericOAuthenticator.scope = [‘openid’, ‘profile’, ‘email’]

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [February 9, 2023, 10:08pm UTC](https://discourse.jupyter.org/t/enable-mfa-multi-factor-authentication-using-oauth-generic-oidc/17907/2 "2023-02-09T22:08:52Z")

</div>

Please can you turn on debug logging and show us the hub logs? Can you also tell us your version of JupyterHub and OAutthenticator, and a bit about how you’ve deployed everything?
