2018-02-13 UTC
snarfed and [kevinmarks] joined the channel
gRegorLove_, snarfed, snarfed1, workingwriter, renem, [workingwriter], [miklb], [tantek] and tantek joined the channel
# 03:01 tantek [kevinmarks] "Here, let’s make a user table in Postgres" lol. Here, let's start with a plumbing-centric thought-exercise. How about we don't?
# 03:02 tantek and I see zero mention of any research about how do any existing sites deal with usernames.
# 03:02 tantek so yes, if you ignore prior art, x is harder than it should be
strugee, tantek, [xavierroy] and [snarfed] joined the channel
# 03:59 [snarfed] so re github oauth permissions... they have another class of apps with finer granularity... but still not quite ideal
# 04:00 [snarfed] tldr, i may be able to offer either read only on public *and* private repos, or read/write on public only, but not read only on public only :(
tantek joined the channel
# 04:29 [miklb] or I may be missing something, haven’t been able to keep up with conversation
# 04:30 tantek snarfed, "public only" would consistent with Bridgy methodology so far on other silos
# 04:31 tantek "read/write on public only" seems to make the most sense, because presumably you want to be able to "write" a new issue or comment, or edit one
# 04:36 [snarfed] miklb: yup! but that scope includes private repos, at least by default :(
# 04:36 Ruxton mm yeah I'd have a huge issue giving you visibility to my private repos
sebsel, barpthewire, [kevinmarks], [pfefferle], mifga, [mrkrndvs], [xavierroy] and [gerwitz] joined the channel
jeremycherfas and [colinwalker] joined the channel
[kevinmarks] and AngeloGladding joined the channel
[pfefferle] joined the channel
[gerwitz] joined the channel
leg, [kevinmarks], [xavierroy], eli_oat, dougbeal|mb1, [mifga], ancarda, jeremych_, j12t, KartikPrabhu, [gerwitz] and jeremycherfas joined the channel
# 15:13 jeremycherfas It is so frustrating that PHP seems to care whether one uses single or double quotes.
[kevinmarks] joined the channel
# 15:19 jeremycherfas Except that apparently the target string in a str_replace MUST be enclosed in double quotes.
# 15:23 jeremycherfas All I can tell you is that it worked with double quotes and not with single quotes.
# 15:27 aaronpk double quotes will treat $ as variables inside, single quotes will not
# 15:27 aaronpk so '$foo' will be literally '$foo' but "$foo" will be the value of the $foo variable
# 15:31 Zegnat I basically always use single quotes, because I do not want PHP to go over my string and try to do any resolving of variables and other things
jeremych_ joined the channel
# 15:37 Zegnat Except maybe use u-bookmark-of rather than u-repost-of, as it isn't a full repost.
# 15:40 jeremych_ Thanks aaronpk
# 15:41 jeremych_ Another noobieq: what is the significance of this line
# 15:41 jeremych_ curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookiefile");
# 15:42 jeremych_ I see it in some examples, not in others, and can't seem to figure out whether I need it or not.
# 15:42 Zegnat Any cookies will be read and written from and to that file. So you can have the same session going over multiple curl calls.
# 15:43 Zegnat E.g. if your first call logs in to a site, you can store the cookies the site gives back, and then send those cookies on your next request to stay in the logged in session.
# 15:43 Zegnat Might be important if crawling a website or automating tasks. For most APIs you wouldn't need it as those do not tend to set cookies.
# 15:44 jeremych_ So then, I guess I do not need it if simply looping through my feed and sending a few curls to my site?
# 15:45 jeremych_ In that case, here goes ...
# 15:45 Zegnat It won't do any harm (if your site doesn't set cookies, nothing gets written anyway)
# 15:50 jeremych_ Not getting the icon I hoped for, but that's minor.
# 15:51 jeremych_ Because, I believe, Known strips extraneous HTML from Titles.
# 15:52 jeremych_ Oh, and they're coming in the wrong order, but that doesn't matter either as I will only be running this once a day, if that.
tantek joined the channel
# 15:53 jeremych_ Thanks, and thanks also for all your help along the way.
# 15:54 Loqi jeremycherfas has 6 karma in this channel (15 overall)
# 15:55 jeremych_ Hardly. But very satisfying nevertheless. I'll do a bit of work with array_reverse() and then maybe see if anyone else is interested.
# 15:55 Zegnat Yeah, there can definitely still be places where Known is stripping HTML. Though you might be able to just fix that on the template end.
# 15:55 jeremych_ Zegnat++ sknebel++ cweiske++ for patience and assistance along the way.
# 15:55 Loqi zegnat has 45 karma in this channel (170 overall)
# 15:56 jeremych_ Oh, c'mon loqi. You can do better than that.
# 15:56 jeremych_ sknebel++ for patience and assistance along the way.
# 15:56 Loqi sknebel has 29 karma in this channel (85 overall)
# 15:56 jeremych_ cweiske++ for patience and assistance along the way.
# 15:56 Loqi cweiske has 26 karma in this channel (127 overall)
jeremycherfas joined the channel
# 16:07 grantcodes Sweet, don't know what changed but together is working again for me. Must've been a change to aperture :)
KartikPrabhu, snarfed and [cleverdevil] joined the channel
# 16:23 [cleverdevil] (Looks like potentially a file or change didn't get checked in from your environment? Or maybe its a Safari issue?)
KartikPrabhu and barpthewire joined the channel
jackjamieson and [miklb] joined the channel
# 16:50 [miklb] [eddie] I discovered ImageOptim has an API and am currently testing it out
[eddie] joined the channel
# 16:52 [miklb] works great, just not sure if best value if I’m going to pay for it. Imgix might be a better value
snarfed and KartikPrabhu joined the channel
# 17:27 Loqi Ok, I'll tell them that when I see them next
# 17:28 grantcodes Yeah sorry, was a quick hack to get it working online after a server migration
# 17:30 grantcodes May need to log out and back in to update your access token with the new scopes too
KartikPrabhu joined the channel
# 17:32 grantcodes Sweet, I'll need to update the local setup at some point so it's just the single command again.
# 17:33 [cleverdevil] Now I get "{"error":"unauthorized","error_description":"The access token provided does not have the necessary scope for this action"}
"
# 17:34 grantcodes I was getting that error as well. But now it works without changing anything
# 17:35 grantcodes Maybe my logout function doesn't fully clean the localstorage
# 17:35 snarfed no real surprises in the post except for this vague nugget: "Support for Non-Business Profiles [FUTURE]: Basic permissioning for non-business profiles will be supported in early 2019."
# 17:36 aaronpk and there's that secret ?__a query string that returns json
# 17:37 [eddie] When I was testing your site with Indigenous I did notice it wasn’t giving me back the microsub scopes
# 17:39 [eddie] Aperture didn’t bother with the scopes until a recent update a couple days ago
# 17:39 grantcodes I'm not convinced it's known as I had that same bug, then it just started working
# 17:39 [eddie] It returns a 40X error if the right scope isn’t found
# 17:40 aaronpk it caches access tokens for 5 minutes but known is probably returning a new access token on each login
# 17:40 aaronpk it does rely on Known issuing a token with the expected scopes
eli_oat joined the channel
KartikPrabhu joined the channel
# 17:47 aaronpk that seems likely. maybe I can add an account setting to have Aperture disable scope checking
# 17:47 [cleverdevil] So, looking into my database at all of the tokens, every single one just shows "post."
# 17:48 [cleverdevil] Even though it clearly requests all of the right scopes (displays them upon authorize).
# 17:51 grantcodes Ah yeah that seems like an issue. I guess my issue was just that 5m cache and yours is scopes not being returned properly
# 17:57 aaronpk if it's storing the scopes in the database then you might be able to just change that record
# 18:02 grantcodes Actually speaking of this, I have a security question: My token endpoint actually just encrypts the scopes inside the access token and then decrypts the token to get the scopes again. Can anyone think of any issues with that?
# 18:05 snarfed iirc aaronpk has written about stateless tokens like this? (couldn't find it with a few searches)
# 18:05 aaronpk the main drawback with that kind of token is that you can't expire them without adding back state tracking
# 18:10 grantcodes Cool thanks :) I think that's fine for me. I don't use many at one time so if I ever have a security issue I can block a client_id or just expire all tokens
# 18:25 snarfed * "oauth apps" can request read/write access to just public repos.
# 18:25 snarfed * "github apps" can request read only vs read/write, to all repos or ones the user selects, but no way to default to public only.
# 18:25 snarfed and the dealbreaker for github apps is, they can't access repos that a user (or org) doesn't own, or notifications, so they're not really usable for backfeed.
# 18:26 snarfed so my tentative plan is for bridgy backfeed to request notifications and public_repo (read/write) permissions
# 18:28 snarfed my one reservation is that notifications includes issue and PR titles (only) from private repos, which the auth prompt doesn't mention :/
eli_oat joined the channel
tantek, KartikPrabhu, eli_oat, AngeloGladding, tantek_, snarfed and chrisaldrich joined the channel
snarfed and [eddie] joined the channel
# 23:11 snarfed eh not really. bridgy only cares about items, not feeds themselves
# 23:12 snarfed short answer seems like, if they have ids, use fragment with id