Yes, added. I鈥檓 able to login as well in the screen and then I get the Allow/Deny screen as well.
Yes, I have the same issue. My postman logs show my sid as Guest.
The pull-request seemed to be merged. I can鈥檛 update since I鈥檓 on cloud. I will try on my local machine and report back.
If the above one is my problem, I鈥檓 not sure if using curl will fix it. But, I鈥檒l give it a try anyway!
Thank you so much for your help! Much appreciated!
Update: I was able to authenticate with postman. I changed client authentication setting in postman from send as basic auth header to send client credentials in body.
As said in this thread.
Now, I have to find a way to add this configuration in CodiMD @revant_one Thanks for the help!
Also, is there any way I can make the authorization work for send as basic auth header?
Please guide.
Header like Authorization: Basic base64(client_id:client_secret) triggers frappe to check username and password instead of client_id and client_secret.
Traceback (most recent call last):
File "/home/frappe/benches/bench-version-12-f1-71/apps/frappe/frappe/app.py", line 64, in application
response = frappe.api.handle()
File "/home/frappe/benches/bench-version-12-f1-71/apps/frappe/frappe/api.py", line 59, in handle
return frappe.handler.handle()
File "/home/frappe/benches/bench-version-12-f1-71/apps/frappe/frappe/handler.py", line 24, in handle
data = execute_cmd(cmd)
File "/home/frappe/benches/bench-version-12-f1-71/apps/frappe/frappe/handler.py", line 63, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/benches/bench-version-12-f1-71/apps/frappe/frappe/__init__.py", line 1054, in call
return fn(*args, **newargs)
File "/home/frappe/benches/bench-version-12-f1-71/apps/frappe/frappe/integrations/oauth2.py", line 111, in get_token
headers, body, status = get_oauth_server().create_token_response(uri, http_method, body, headers, frappe.flags.oauth_credentials)
File "/home/frappe/benches/bench-version-12-f1-71/env/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/endpoints/base.py", line 116, in wrapper
return f(endpoint, uri, *args, **kwargs)
File "/home/frappe/benches/bench-version-12-f1-71/env/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/endpoints/token.py", line 96, in create_token_response
self.validate_token_request(request)
File "/home/frappe/benches/bench-version-12-f1-71/env/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/endpoints/token.py", line 122, in validate_token_request
self._raise_on_bad_method(request)
File "/home/frappe/benches/bench-version-12-f1-71/env/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/endpoints/base.py", line 84, in _raise_on_bad_method
description=('Unsupported request method %s' % request.http_method.upper()))
oauthlib.oauth2.rfc6749.errors.InvalidRequestError: (invalid_request) Unsupported request method GET <oauthlib.Request SANITIZED>
Even when I tried POST, it threw error.
The error was because the details were passed as request params. When I passed the details in the request body, it gave back a json response saying invalid grant.
I guess I will have to modify CodiMD鈥檚 post request and include the details in the body and not in the params.
It works fine now. There were some misconfiguration on the client side.
The client was looking for keys which weren鈥檛 present in the response. Once I fixed it, everything got alright.
Really sorry for taking up a lot of you time. And thank you once again!