How to setup frappe oauth2 server in existing ERPNext?

I am trying to setup frappe oauth provider as Social Login but it is giving me following error

“(most recent call last):
File “apps/frappe/frappe/app.py”, line 66, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1607, in call
return fn(*args, **newargs)
TypeError: login_via_frappe() missing 2 required positional arguments: ‘code’ and ‘state’”

Anybody have detail documents how to setup?

After this I am not able to disable social login from Admin user, Getting below error