#dev 2018-07-07

2018-07-07 UTC
[kim_landwehr], TripFandango and [cleverdevil] joined the channel
#
[cleverdevil]
Sweet. Got basic IndieAuth working in indiepaper.io, but it needs a lot of work to glue it all together.
#
[cleverdevil]
And I am getting ready to leave for Dubai for a week, so it may take a little while to get it out.
#
[cleverdevil]
In the meantime, the updated macOS app is released that includes the ability to auto-configure with a URL.
[chrisaldrich], eli_oat and renem joined the channel
#
aaronpk
[cleverdevil]++
#
Loqi
cleverdevil has 34 karma in this channel (104 overall)
#
dougbeal
What is an invite
#
Loqi
An invitation is an optional feature of an event post (an event with invitations), or a reply to an event post that also notifies a list of invitees that they've been invited to the event, or a special case of that, an RSVP to an event that also invites additional people to it https://indieweb.org/invite
[eddie], TripFandango, kicks, snarfed, tantek and barpthewire joined the channel
iasai joined the channel
#
tantek.com
edited /code-of-conduct (-13) "/* See Also */ link examples and move examples there"
(view diff)
#
tantek.com
edited /code-of-conduct-examples (+98) "couple more examples"
(view diff)
iasai, trip_ and iasai_ joined the channel
eli_oat, trip_, TripFandango and [kevinmarks] joined the channel; trip_ left the channel
#
pstuifzand
Does anyone use the bookmarklet for Indiepaper?
#
pstuifzand
I get an error in Chrome "Failed to load https://indiepaper.io/: Response for preflight is invalid (redirect)"
[jgmac1106], trip_, [kim_landwehr], TripFandango and snarfed joined the channel; trip_ left the channel
#
sknebel
rivercat++
#
Loqi
rivercat has 1 karma
[eddie] joined the channel
#
[eddie]
!tell [kim_landwehr] so what is happening is Indigenous is trying to send Micropub post to endpoint that is listed on your login url. It looks like that would be “http://www.wrke.online /micropub” oh! Looks like there is a space or a line break in your url that probably needs to be fixed
#
Loqi
Ok, I'll tell them that when I see them next
#
Loqi
[Kim Landwehr] Trying out this guide to sending webmentions
#
aaronparecki.com
edited /Category:IndieAuth (+17) "/* Services and Source Code */ +micro.blog"
(view diff)
#
aaronparecki.com
edited /Category:IndieAuth (-20) "/* Services and Source Code */ remove indiecert.net since the domain expired"
(view diff)
#
aaronparecki.com
edited /Category:IndieAuth (+37) "/* Services and Source Code */"
(view diff)
ludovicchabant and davidmead joined the channel
#
@Josh412
↩️ Wow, really interesting. Is this plugin on Github? https://wordpress.org/plugins/indieauth/
(twitter.com/_/status/1015638027371237377)
#
aaronpk
that's annoying that wordpress.org doesn't link to the github repo
#
@aaronpk
↩️ Yep! https://github.com/indieweb/wordpress-indieauth That's annoying that http://wordpress.org doesn't have a link to the GitHub source.
(twitter.com/_/status/1015638496306843648)
#
GWG
Make a note and we will fix it?
#
aaronpk
I guess you can link to it in the description
#
aaronpk
it'd be nice if the plugin directory had a field for it so all the plugins would show it in the same spot
#
sknebel
can't show scary stuff like github links to users
#
aaronpk
There's already a "development" tab tho
[kevinmarks] joined the channel
#
KartikPrabhu
[kevinmarks]: could you make a mf2py release from 1.1.1 ?
#
KartikPrabhu
thanks for reviewing the PR
#
dougbeal
Wordpress.org / the plugin page also makes no mention of the actual name of the plugin so you can manpulate it from wp cli
[snarfed] joined the channel
#
[snarfed]
@kartikprabhu we definitely need to add you to whatever else you need so you can cut releases yourself
#
KartikPrabhu
[snarfed]: oh, maybe now I can do it myself
#
KartikPrabhu
oh yeah I can! on it!
#
KartikPrabhu
of course I am not going to accept my own PRs even though I can :P
#
[snarfed]
kartikprabhu++
#
Loqi
kartikprabhu has 26 karma in this channel (210 overall)
#
[snarfed]
sounds like you got the real PR(s) reviewed though? if the new one (s) are just bumping the version, docs, etc, i think it's ok to release anyway
#
[snarfed]
totally your call though
chrisaldrich and [cleverdevil] joined the channel
#
KartikPrabhu
[snarfed]: yeah the real stuffs got reviwed. I already cut a release on github. putting on pypi now (if i can find the tutorial I used last time)
[manton] and [dgold] joined the channel
#
[snarfed]
thank you!
#
[snarfed]
not urgent
#
KartikPrabhu
is now waiting the 15 or mins for pypi :P
#
[snarfed]
15m?! huh hasn't been for me before. odd
#
KartikPrabhu
it did that last time
#
KartikPrabhu
oh hey shorter this time. maybe last time I sort of "panicked" and uploaded multiple times
tonzyl joined the channel
#
KartikPrabhu
[snarfed]: done! https://pypi.org/project/mf2py/ come and get it
#
Loqi
[microformats] mf2py: Python Microformats2 parser
davidmead joined the channel
#
[snarfed]
kartikprabhu++
#
[cleverdevil]
Hey [manton]
#
[cleverdevil]
(And any other interested parties)
#
[cleverdevil]
I haven't linked it from the front page yet.
#
[cleverdevil]
Want to see how it works for others first.
dougbeal|mb1 joined the channel
#
[cleverdevil]
[aaronpk] does aperture support indieauth for channels yet?
#
aaronpk
haha no sorry
#
[cleverdevil]
(Note: this flow I've built uses the "save" scope)
#
[cleverdevil]
I didn't think so 😉
#
aaronpk
I might be able to work on that tomorrow tho
#
aaronpk
i'm excited there is a use for it now
#
[cleverdevil]
Well, once it does, I think this flow should work!
#
pstuifzand
How would indieauth for aperture channels work?
#
[cleverdevil]
It generates a bookmarklet with the token and also a link for auto-configuring the indiepaper macOS app
#
aaronpk
let me document this in the github issue
#
[cleverdevil]
You just click and it does the configuration.
#
pstuifzand
I just used it, it does have "Bearer None" in the Authorization header
#
[cleverdevil]
In the IndieAuth flow, it isn't returning a token?
#
[cleverdevil]
I've only tested it with my Known site, and it gets a token back.
#
[cleverdevil]
But, who knows 🙂
#
[cleverdevil]
It also does all of the generation client side in JavaScript.
#
[cleverdevil]
So, there could be something wonky there.
#
pstuifzand
I see, there is also a token=None in the url
#
[manton]
This is great! I just tested it with Micro.blog and it's "working" although I get bearerToken=None in the "Configure Indiepaper for macOS" button.
#
[cleverdevil]
Ah, weird.
#
[cleverdevil]
Looks like I have some debugging to do.
#
[cleverdevil]
But, now I need to go finish packing for Dubai. If you see anything obvious, feel free to leave me a message 😛
#
pstuifzand
Perhaps your using a client side token based auth flow? aaronpk, does that exist?
#
aaronpk
it worked for me!
#
aaronpk
oh I wonder if the "save" scope is throwing off the other servers
snarfed joined the channel
#
pstuifzand
not mine, it's pretty liberal for scopes
#
pstuifzand
I see response_type=code in the GET request to the auth endpoint
#
pstuifzand
And a redirect with a code after I allowed the request
#
aaronpk
[cleverdevil]: do you have a server-side proxy to get around the CORS issue?
#
pstuifzand
I also see a POST on the token endpoint with the right code
leg joined the channel
#
pstuifzand
My guess would be that the params are in the url instead of the form encoded params ($_GET vs. $_POST)
#
pstuifzand
aaronpk, does your endpoint support both ($_REQUEST)?
#
aaronpk
hm it's using laravel so maybe
#
aaronpk
I really wish these frameworks didn't do that
#
pstuifzand
should it be only $_POST?
#
Loqi
ok, I added "https://blog.joinmastodon.org/2018/07/how-to-make-friends-and-verify-requests/" to the "See Also" section of /ActivityPub https://indieweb.org/wiki/index.php?diff=49713&oldid=49602
#
[cleverdevil]
So, everything is happening server side, except once the token is received, its passed to the static site as a callback and then the bookmarklet and other link are generated via client side javascript.
#
aaronpk
what parameters are you sending in the POST request to the token endpoint, and are you handling the case when the endpoint returns an error?
#
[cleverdevil]
Probably not 🙂
#
[cleverdevil]
This was super quick and dirty.
#
[cleverdevil]
```def request_token(me, code):
#
[cleverdevil]
endpoints = discover_endpoints(me)
#
[cleverdevil]
raise Exception('No token endpoint discovered.')
#
[cleverdevil]
if len(endpoints.get('token_endpoint', [])) == 0:
#
[cleverdevil]
if len(endpoints.get('micropub', [])) == 0:
#
[cleverdevil]
token_endpoint = endpoints['token_endpoint'].pop().geturl()
#
[cleverdevil]
raise Exception('No micropub endpoint discovered.')
#
[cleverdevil]
micropub_endpoint = endpoints['micropub'].pop().geturl()
#
[cleverdevil]
response = requests.post(token_endpoint, params={
#
[cleverdevil]
'grant_type': 'authorization_code',
#
[cleverdevil]
'code': code,
#
[cleverdevil]
if response.status_code != 200:
#
[cleverdevil]
return None
#
[cleverdevil]
'token': parse_qs(response.text).get('access_token', [None])[0],
#
[cleverdevil]
'micropub': micropub_endpoint
#
KartikPrabhu
my eyes... my eyes!
#
[cleverdevil]
Oops, that was supposed to pass a link to that code
#
[cleverdevil]
Not the code itself
#
[cleverdevil]
Sorry 🙂
#
[cleverdevil]
Anyway, I am guessing that I am getting something other than 200 back from the token endpoint.
#
[cleverdevil]
And then just returning "None" and not handling it gracefully on the other end.
snarfed joined the channel
#
aaronpk
Do the client id and redirect match exactly? They're strings there so there's a chance...
#
aaronpk
I assume they do, otherwise my endpoint isn't validating properly
#
pstuifzand
it seems you need to send the variables with data={} instead params={} for a POST request
#
pstuifzand
with params they are added to the url instead of the request body
#
aaronpk
pstuifzand++ good catch
#
Loqi
pstuifzand has 4 karma in this channel (5 overall)
#
aaronpk
I should really figure out how to limit laravel to looking in the post body
#
[cleverdevil]
Fixed and uploading to Lambda...
#
Loqi
I agree
#
aaronpk
"You do not need to worry about the HTTP verb used for the request, as input is accessed in the same way for all verbs:"
#
[cleverdevil]
Okay, its live.
#
[cleverdevil]
Try now, @pstuifzand?
#
[cleverdevil]
And you said it worked for you, [aaronpk] and [manton]?
#
[manton]
Trying again...
#
[cleverdevil]
The only thing I don't like about the way I did it is that the token ends up in a query string, which could bleed into browser history.
snarfed joined the channel
#
[cleverdevil]
The endpoint and server-side stuff is on Lambda, but the website is static and lives on S3/CloudFront.
#
[manton]
Still getting "None" here for Micro.blog, although I can see it did generate a token on my server. So maybe something in the response doesn't match what you're expecting.
#
[cleverdevil]
What status code do you return?
#
[cleverdevil]
And are you sending back JSON or form encoded response?
#
[manton]
JSON with a 200.
#
pstuifzand
me too json with 200
#
[manton]
Oh wait. I always assume "create" and return that in the JSON. Maybe that's it?
#
[cleverdevil]
No, its the JSON.
#
[cleverdevil]
I am assuming form encoded response since I am sending form encoded request data.
#
pstuifzand
alright it says it right there in the code `parse_qs`...
#
[manton]
Okay. I _think_ the spec says it's supposed to always return JSON. Trying to confirm that.
#
[cleverdevil]
I can detect a JSON response.
#
aaronpk
I think Known is one of the last that sends back only form responses
#
[cleverdevil]
I am going to prefer JSON responses, and fall back to form responses.
#
aaronpk
that's what I do now
#
[cleverdevil]
Uploading fix...
#
[cleverdevil]
OK, should be there now.
#
[cleverdevil]
Give it a shot one more time, if you don't mind [manton]?
#
pstuifzand
I have a token now
#
[cleverdevil]
Now I need some actual "save" scope aware endpoints to test it with 🙂
#
[cleverdevil]
Consider this a formal feature request [aaronpk] and [manton] haha.
#
pstuifzand
there is still a small problem
#
pstuifzand
perhaps you have seen the issue on github?
#
Loqi
[pstuifzand] #1 Error on preflight when using bookmark
#
pstuifzand
my guess is that the redirect in "index" breaks the OPTIONS / cors check
#
[cleverdevil]
I did, but haven't had a chance to look into it.
#
[cleverdevil]
Ah, gotcha.
#
[cleverdevil]
Let me look.
#
aaronpk
unrelated: wow json queries in mysql are great
#
[cleverdevil]
Yes! I love JSON support in MySQL [aaronpk]
#
[cleverdevil]
Best of both worlds: relational databases and NoSQL 🙂
#
[cleverdevil]
Uploading a potential fix for that right now pstuifzand
#
aaronpk
ohh I forgot the drupal plugin supports indieauth too!
#
aaronpk
[eddie]++ this is a fantastic page https://indigenous.abode.pub/ios/help/
#
Loqi
eddie has 37 karma in this channel (66 overall)
#
Loqi
Indigenous for iOS
#
pstuifzand
I just added more complete websub support to Ekster (microsub server)
#
pstuifzand
it now subscribes to feeds (if it can find the huburl)
#
[cleverdevil]
Okay, feel free to try again @pstuifzand! I've made it so it only does the redirect on GET requests.
#
pstuifzand
that fixes it
#
pstuifzand
cleverdevil++
#
Loqi
cleverdevil has 35 karma in this channel (105 overall)
#
[cleverdevil]
Looks like IndieAuth support works well 🙂
#
[cleverdevil]
Once I have at least one use case, I'll update the front site with details.
#
pstuifzand
At the moment I use it with the microsub server
#
pstuifzand
I guess the use case would be to have a (perhaps hidden) "archive" channel/tag on the blog and automatically post there
#
pstuifzand
I know aaronpk has channels on his website, that can be bound to tokens, so with Indieauth and channel selection, you could create your own archive of articles
#
aaronpk
yeah I was considering doing this with my "bookmarks" page
#
aaronpk
so anything I post via indiepaper goes into my bookmarks
#
@cleverdevil
I added experimental support for IndieAuth in Indiepaper today. Test it out here – https://www.indiepaper.io/indieauth.html. Once authenticated, you get an automatically generated bookmarklet and a button to click for automatically configuring Indiepaper for macOS.
(twitter.com/_/status/1015689745228279811)
#
pstuifzand
I get a 400 error now on indiepapier.io
#
[cleverdevil]
Womp womp.
#
[cleverdevil]
This is with the bookmarklet?
#
pstuifzand
Oh probably it's an error from my website, I see a 401 in the logs for the micropub endpoint
#
[cleverdevil]
Yeah, I just tested via both bookmarklet and macOS app, and it works for me.
#
[manton]
[cleverdevil] The token works now! I'll be adding support for scope=save soon.
#
[cleverdevil]
Yay! That's awesome news.
#
pstuifzand
ok, i'll try again
#
Loqi
yay!
#
[cleverdevil]
Once you get something working, we can coordinate to make sure I have good documentation and user experience on the site.
#
pstuifzand
it seems I do implement scopes
#
[cleverdevil]
Eventually, I want to add support for having multiple targets in the macOS app, and the ability to add categories.
#
aaronpk
opens up aperture
#
aaronpk
gets a wrench
#
aaronpk
let's see what I can do in a couple hours
#
pstuifzand
With aperture and indieauth I guess you would use an url for a channel, and use indieauth login with that?
#
pstuifzand
ok, it works with the blog now, it was a scope issue
#
aaronpk
oh yeah sorry I was gonna write that down
#
Loqi
[Peter Stuifzand] OAuth for the Open Web
#
aaronpk
haha wow
#
pstuifzand
i just added it with the bookmarklet
#
aaronpk
hm, so it's a little weird that it doesn't have any indication of the original author or URL
#
aaronpk
maybe republishing these is not the best idea
#
aaronpk
or indiepaper should include the original author info
#
aaronpk
and hopefully sites that republish the post would show that
#
pstuifzand
yeah, I'll delete it. I guess it should be a hidden page or something
#
[cleverdevil]
So, it does grab the author if it finds it.
#
[cleverdevil]
But, sometimes the service that I use for parsing can't find the author.
#
pstuifzand
I'll have to check what the endpoint got, and what is overwritten
#
pstuifzand
perhaps I reset the author if it can't find it
#
aaronpk
hm wonder why my author info isn't showing up in that service then
#
[cleverdevil]
Or more likely an enhancement request.
#
aaronpk
i'm guessing they don't parse mf2
#
pstuifzand
does it support microformats?
#
aaronpk
I wonder what they expect the page to have to indicate the author
#
aaronpk
[cleverdevil]: alternate approach: you could look for mf2 first and use that, then use mercury as a fallback
#
pstuifzand
it does find the publication date
#
[cleverdevil]
One thing I could do is enhance Indiepaper to look for MF2 first
#
aaronpk
the mf2 is likely to be way higher resolution data
#
[cleverdevil]
Good idea [aaronpk];)
#
[cleverdevil]
Can you file a ticket for me?
#
pstuifzand
for the second article that I added it found an author, but it's not an h-card, so the blog doesn't show it
#
aaronpk
this is pretty cool. my replies are all over the place... replying to github issues, mastodon posts, tweets, indie websites... https://aaronparecki.com/replies
#
[cleverdevil]
We've come a long way 🙂
#
@manton2
If you’re familiar with OAuth, this introduction to IndieAuth walks through the process of how auth for the open web works. Really happy that http://Micro.blog supports this now. https://aaronparecki.com/2018/07/07/7/oauth-for-the-open-web
(twitter.com/_/status/1015697623792209920)
[snarfed] joined the channel
KartikPrabhu and iasai joined the channel
[eddie] joined the channel
#
[eddie]
Wow! A lot of changes going on today!
[manton] and [cleverdevil] joined the channel
#
[cleverdevil]
So, for https://github.com/cleverdevil/indiepaper/issues/2 do y'all think I should use the hosted version of mf2py or embed it as a dependency?
#
Loqi
[aaronpk] #2 Look for mf2 first, use Mercury as a fallback
#
sknebel
which hosted version? :D
#
sknebel
to my knowledge, there isn't a regularly updated one currently
#
KartikPrabhu
I don't know of any hosted version acting as an API
[snarfed] joined the channel
#
sknebel
that's some old version
#
[cleverdevil]
Ah, I'll embed as a dependency then 🙂
#
aaronpk
if you *can* bundle the parser in with the lambda then I would do that
#
[cleverdevil]
It should be pretty easy.
#
aaronpk
it's already running on lambda so you don't get any benefit of using an external one really
#
aaronpk
someone was bound to say it
#
aaronpk
glad I had that page already started
#
aaronpk
I do wonder if I should have included a little section on that at the bottom of the post
#
KartikPrabhu
you can add it as a footnote/ref
#
KartikPrabhu
but now it will show up as a reply no?
#
aaronpk
oh yeah the bridgy one will
#
aaronpk
uhoh, it's on hackernews
#
aaronpk
keeps dipping in and out of the front page
#
aaronpk
I hope my site stays up
#
[cleverdevil]
OK, I have updated Indiepaper to use mf2py to parse submitted articles, and then to fallback to Mercury if nothing is discovered.
#
[cleverdevil]
Its uploading now.
#
[cleverdevil]
When I'm done, I'd love to have a few people give it a try 🙂
#
[eddie]
Should I be using indiepaper.io now or are they the same service? I think I have all my stuff still on cleverdevil.io’s url
#
[cleverdevil]
Use the new target.
#
[cleverdevil]
I think its set up to redirect under the hood.
#
[cleverdevil]
Crud, I broke it.
#
KartikPrabhu
[cleverdevil]: let me know if mf2py messes up
#
[cleverdevil]
It worked great!
#
[cleverdevil]
Just Indiepapered [aaronpk]'s OAuth article as a test - https://cleverdevil.io/s/J0bOeXSwhi.png
#
[cleverdevil]
Author picked up nicely 🙂
#
[cleverdevil]
Then an ESPN article as a test of the fallback, which also worked.
[manton] joined the channel
#
[manton]
Alright, I deployed support for scope=save on Micro.blog. It routes Micropub posts to a special queue and makes the posts available as JSON Feed with a unique feed URL for each user. Fun! Not sure the best way to frame this for regular users, but it's there as a secret feature to play with.
#
[cleverdevil]
[manton]++ nice! I’ll give it a try soon.
#
Loqi
manton has 8 karma in this channel (64 overall)
#
@colemickens
https://aaronparecki.com/2018/07/07/7/oauth-for-the-open-web Why do I need IndieAuth when OpenID Connect is around and already implemented in lots of places? It even has discovery via webfinger too?
(twitter.com/_/status/1015738087970779136)
#
KartikPrabhu
aaronpk: there you go ^
#
[eddie]
Wow!! That’s awesome Manton!!
#
[eddie]
[manton]++
#
Loqi
manton has 9 karma in this channel (65 overall)
#
@balloob
The IndieAuth extension to OAuth2 is perfect. I will adopt this in @home_assistant to make it easier for people to build apps against local instances.
(twitter.com/_/status/1015740688695250946)
#
gRegorLove
manton++
#
Loqi
manton has 10 karma in this channel (66 overall)
#
GWG
Home Assistant is getting IndieAuth?
#
GWG
That would be perfect
[chrisaldrich] and eli_oat joined the channel