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/”, line 66, in application
response = frappe.api.handle()
File “apps/frappe/frappe/”, line 54, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/”, line 45, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/”, line 83, in execute_cmd
return, **frappe.form_dict)
File “apps/frappe/frappe/”, 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