| 09:12 | FarmerEd[m] | <paul121[m]> "Interesting that others don't..." <- Built and tested an Authorization and Client Credentials flow this morning and both work. I will include these options of future releases of my farmOS Oauth2 Node. |
| 09:12 | * | uploaded an image: (30KiB) < libera.ems.host/_matrix/media/r0/downloa > |
| 09:31 | * | sent a code block: libera.ems.host/_matrix/media/r0/downloa |
| 09:34 | FarmerEd[m] | Perhaps the documentation could include (or link to) some examples written in various languages, Python, JS, PHP etc? |
| 09:36 | FarmerEd[m] | Or maybe we just need to get the community blog going. |
| 09:49 | FarmerEd[m] | > <@paul121:matrix.org> Interesting that others don't allow password grant either! Yeah I'm curious with Node-Red if & how the authorization flow would work.. |
| 09:49 | FarmerEd[m] | * Built and tested an Authorization and Client Credentials flow this morning and both work. I will include these options of future releases of my farmOS Oauth2 Node. |
| 09:49 | FarmerEd[m] | gist.github.com/Farmer-Eds-Shed/022156e9 |
| 12:03 | mstenta[m] | Ah interesting |
| 12:03 | mstenta[m] | I wonder if thats specific to the simple_oauth module? Or maybe has to do witht the type of request sent from node red? |
| 12:05 | mstenta[m] | Reminds me of Python where you can pass different types of objects into the requests lib... and it affects how the request gets sent |
| 12:06 | mstenta[m] | Maybe the its possible to tell node red to send as a json object instead of form urlencoded? |
| 12:07 | mstenta[m] | I would assume simple_oauth accepts both |
| 12:07 | mstenta[m] | But not sure |
| 12:12 | FarmerEd[m] | Could well be Node-Red issue but, only like that with farmOS, but it's not particularly an issue. |
| 12:13 | FarmerEd[m] | I basically cut an pasted code I'm using for 2 other oauth2 flows. But just had to change that line to make it work with farmOS. |
| 12:46 | mstenta[m] | Ok hmm |
| 14:01 | FarmerEd[m] | Yea, not sure myself. |
| 14:01 | FarmerEd[m] | The original Oauth2 Contrib node I used for farmOS worked fine for password and client credentials but not authorization code, (it's in their manual pages as work in progress) |
| 14:01 | FarmerEd[m] | The other oauth2 flows I use only allows authorization code so I could never use the Oauth2 Contrib node for them. So I had to build the flow from scratch for them using http request nodes which is Node-Reds included http client, I guess built on some common JS library. |
| 14:01 | FarmerEd[m] | When I couldn't get the authorization flow to work with farmOS and http nodes, I tried a password grant which also failed with the same error "invalid grant type". I could see in Node-Red console that the only difference in http requests between working and failing flows was the headers. |
| 16:00 | * | ander[m] has quit (Quit: You have been kicked for being idle) |