| 14:14 | paul121[m] | If we drop password grant (I'm becoming more and more convinced we should) then we need to make it easier for users to make private consumers (with a `client_secret`) that they can use with the client credentials grant. |
| 14:14 | paul121[m] | This is how I would recommend people run scripts via the API, configuring a separate consumer for a specific user, perhaps even separate consumers for each script/workflow you work on. |
| 14:15 | paul121[m] | We also need to get more formal client credentials and auth code grant supper in the client libs |
| 14:18 | symbioquine[m] | > <@paul121:matrix.org> If we drop password grant (I'm becoming more and more convinced we should) then we need to make it easier for users to make private consumers (with a `client_secret`) that they can use with the client credentials grant. |
| 14:18 | symbioquine[m] | > |
| 14:18 | symbioquine[m] | > This is how I would recommend people run scripts via the API, configuring a separate consumer for a specific user, perhaps even separate consumers for each script/workflow you work on. |
| 14:18 | symbioquine[m] | Related: farmos.discourse.group/t/using-farmos-2- |
| 14:18 | paul121[m] | <FarmerEd[m]> "I guess my issue is I'm trying..." <- Haven't read the latest on the forum, but I think the refresh grant should be pretty universal & work for all use cases. In the more custom OAuth integrations I have done I add a bit of logic that checks the expiration time before each request goes out, if it's about to expire, then do a refresh real quick, then continue the request. |
| 14:18 | paul121[m] | Getting the expiration time may mean you need to calculate an `expires_at` when you first get the token & receive `expires_in` |
| 14:20 | symbioquine[m] | symbioquine[m]: That's how I'm currently managing my consumer configurations as code |
| 14:20 | FarmerEd[m] | > <@paul121:matrix.org> Haven't read the latest on the forum, but I think the refresh grant should be pretty universal & work for all use cases. In the more custom OAuth integrations I have done I add a bit of logic that checks the expiration time before each request goes out, if it's about to expire, then do a refresh real quick, then continue the request. |
| 14:20 | FarmerEd[m] | > Getting the expiration time may mean you need to calculate an `expires_at` when you first get the token & receive `expires_in` |
| 14:20 | FarmerEd[m] | Yea, that's pretty much the strategy I've implemented in latest experiments |
| 14:21 | FarmerEd[m] | Gone for expires at (-2min) which is probably overkill |
| 14:23 | paul121[m] | symbioquine[m]: Okay! So private consumers. But no user assigned to them, presumably because you're only using this for SSO, not CRUDing data? |
| 14:24 | FarmerEd[m] | Client credentials doesn't return a refresh token, so you need the reauthenticate with the same credentials |
| 14:25 | symbioquine[m] | paul121[m]: SSO and one read-only script at the moment |
| 14:25 | paul121[m] | FarmerEd[m]: Oh really? |
| 14:26 | symbioquine[m] | symbioquine[m]: You're right I'd need to modify it a bit to set the user if I wanted read-write scripts to make changes as a specific user. |
| 14:26 | symbioquine[m] | symbioquine[m]: (or on behalf of a human) |
| 14:28 | paul121[m] | And if you needed something robust for multiple users you would use auth code :-) |
| 14:28 | FarmerEd[m] | paul121[m]: Yea, apparently that is the spec as credentials not considered user details can be stored in the software. |
| 14:33 | paul121[m] | Well shoot. It would be nice if the expiration time could be increased for individual clients |
| 14:34 | paul121[m] | Could also explore making it easier to use auth code grant for scripting use cases.. we chatted a bit about that |
| 14:34 | paul121[m] | But hard to make a universal solution I think |
| 14:37 | FarmerEd[m] | What about an module inside farmOS that creates a refresh token that can be copied to systems without browsers? |
| 14:39 | paul121[m] | Yep. Although I was thinking you copy the auth code back out to the other systems |
| 14:40 | paul121[m] | That's interesting tho.. you may be able to make a refresh token manually via PHP code... And trick simple_oauth into using it |
| 14:41 | FarmerEd[m] | Maybe an option to do either depending on use case? |
| 14:42 | paul121[m] | Maybe! |
| 16:44 | * | calbasi[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | dazinism[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | spitz234[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | paul121[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | zackmuma[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | riotmiked[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | donblair[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | EvanKelley[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | mstenta[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | symbioquine[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | scrdcow[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | nzsnowman[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | lauriewayne[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | EricLarese[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | skipper_is[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | FarmerEd[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | lordeddi[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | jgaehring[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | ircwaves[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | Mo[m]12 has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | BjrnBrala[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:44 | * | evered[m] has quit (Quit: Bridge terminating on SIGTERM) |
| 16:48 | * | calbasi[m] has joined |
| 16:58 | * | dazinism[m] has joined |
| 16:58 | * | spitz234[m] has joined |
| 16:58 | * | donblair[m] has joined |
| 16:58 | * | lauriewayne[m] has joined |
| 16:58 | * | EricLarese[m] has joined |
| 16:58 | * | jgaehring[m] has joined |
| 16:58 | * | zackmuma[m] has joined |
| 16:58 | * | BjrnBrala[m] has joined |
| 16:58 | * | mstenta[m] has joined |
| 16:58 | * | lordeddi[m] has joined |
| 16:58 | * | Mo[m]1 has joined |
| 16:58 | * | EvanKelley[m] has joined |
| 16:58 | * | scrdcow[m] has joined |
| 16:58 | * | nzsnowman[m] has joined |
| 16:58 | * | riotmiked[m] has joined |
| 16:58 | * | evered[m] has joined |
| 16:58 | * | paul121[m] has joined |
| 16:58 | * | symbioquine[m] has joined |
| 16:58 | * | FarmerEd[m] has joined |
| 16:58 | * | ircwaves[m] has joined |
| 17:58 | mstenta[m] | paul121: nice work! github.com/farmOS/farmOS-map/issues/181 |
| 17:58 | mstenta[m] | what needs to happen in farmOS to leverage this? |
| 17:58 | mstenta[m] | anything? |
| 17:58 | paul121[m] | just a little change :-) github.com/farmOS/farmOS/pull/589 |
| 18:00 | mstenta[m] | Oh you got it already! great! |
| 20:33 | * | uploaded an image: (2121KiB) < libera.ems.host/_matrix/media/v3/downloa > |
| 20:34 | FarmerEd[m] | message interface for Telegram to make field observations |
| 20:34 | symbioquine[m] | Cool |
| 20:34 | symbioquine[m] | Tangentially related, I've learned that webm is better than gif in almost every way... |
| 20:35 | FarmerEd[m] | interesting, will have a look at that |
| 20:37 | * | uploaded a video: (539KiB) < libera.ems.host/_matrix/media/v3/downloa > |
| 20:37 | symbioquine[m] | (Maybe not optimal ffmpeg settings - copied from stackoverflow.com/questions/48361614/ffm) |
| 20:49 | FarmerEd[m] | Maybe not optimal ffmpeg settings, adequate enough for the purpose I'd have thought. |
| 20:53 | mstenta[m] | > message interface for Telegram to make field observations |
| 20:53 | mstenta[m] | WHOA! |
| 21:00 | FarmerEd[m] | Maybe it should be voice notes next...... or is talking to farmOS a step too far? |
| 21:02 | FarmerEd[m] | symbioquine: have you a screen recorder that captures webm? |
| 21:03 | symbioquine[m] | github.com/phw/peek |
| 21:06 | FarmerEd[m] | Cool, but looks like Linux only |