Hello,
I am trying to build and app with oauth but I have this error…
I have installed version 8
This is the url:
http://[URL]/api/method/frappe.integrations.oauth2.authorize?scope=all+openid&response_type=code&redirect_uri=http%3A%2F%2F127.0.0.1%3A8000&client_id=19ee6f84cb
when I use frappe.integrations.oauth2
it returns
You do not have enough permissions to complete the action
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 62, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 53, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 22, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 922, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/oauth2.py”, line 71, in authorize
scopes, frappe.flags.oauth_credentials = get_oauth_server().validate_authorization_request(uri, http_method, body, headers)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/endpoints/base.py”, line 64, in wrapper
return f(endpoint, uri, *args, **kwargs)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/endpoints/authorization.py”, line 116, in validate_authorization_request
return response_type_handler.validate_authorization_request(request)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py”, line 303, in validate_authorization_request
request.client_id, request.redirect_uri, request):
File “/home/frappe/frappe-bench/apps/frappe/frappe/oauth.py”, line 84, in validate_redirect_uri
redirect_uris = frappe.db.get_value(“OAuth Client”, client_id, ‘redirect_uris’).split(get_url_delimiter())
AttributeError: ‘NoneType’ object has no attribute ‘split’
I followed this tuorial:
and this
https://github.com/revant/frappe/blob/develop/frappe/docs/user/en/guides/integration/using_oauth.md
but no success. Any idea why I have this error?