#dev 2024-12-29

2024-12-29 UTC
[snarfed], ttybitnik, alephalpha0, grufwub, geoffo, kushal, Lars-Christian, mahboubine, Guest6, __DuBPiRaTe__, sebbu, GuestZero_, gRegor, Pixi and gRegorLove_ joined the channel
#
gRegor
capjamesg, I get "No authorization endpoint found
#
gRegor
" trying to use IndieAuth on Artemis
#
capjamesg[d]
gRegor Can you share your domain?
#
capjamesg[d]
(that you used)
#
gRegor
really? ;)
#
gRegor
gregorlove.com
#
gRegor
Should have it in the indieauth-metadata JSON as well as the backcompat rel=authorization_endpoint
#
capjamesg[d]
Both should be supported.
#
capjamesg[d]
It looks like an issue in indieweb-utils (on which I depend, and maintain 😅 ).
#
gRegor
eatyourowncooking++
#
Loqi
eatyourowncooking has 1 karma over the last year
#
capjamesg[d]
My code doesn't work with relative URLs 😭
#
[snarfed]
capjamesg when I tried with http://snarfed.org, I got the auth prompt on my site ok, but when I approved and it redirected back, Artemis said "Unable to redeem code"
#
[snarfed]
I then tried with https://snarfed.org and got "An unexpected error occurred," I assume a 500
#
capjamesg[d]
gRegor this is now fixed.
#
gRegor
Unfortunately, also got "failed to redeem code"
#
capjamesg[d]
Are you both using auth endpoints that aren't IndieAuth.com?
#
capjamesg[d]
That error happens when the POST to the token endpoint failed.
#
gRegor
Yeah, all my endpoints are custom within my CMS (ProcessWire)
#
capjamesg[d]
Do you both have the ability to see why the POST to your token endpoint failed?
#
gRegor
What's the response you're getting from mine? Is it a 400 with JSON body including "invalid_request"?
#
capjamesg[d]
The URL should look like yourtokenendpoint.com?grant_type=authorization_code&code=abc&client_id=https://artemis.jamesg.blog&redirect_uri=https://artemis.jamesg.blog/login/indieauth/callback&code_verifier=abc"
#
capjamesg[d]
gRegor can you try to sign in again?
#
capjamesg[d]
I just enabled logging on the POST request so I can see what's going on.
#
gRegor
Just a moment, also turning on some logging
#
gRegor
Trying again
#
gRegor
Done, still failed to redeem. Checking my logs
#
capjamesg[d]
Okay, I got `{"error":"invalid_request","error_description":"Invalid request"}`
#
gRegor
And weird, apparently my logging didn't work. Thanks, that gives me a route to check!
#
gRegor
Are you redeeming at the token endpoint or authorization endpoint?
#
[snarfed]
I see the breakage in my logs, I'll ping GWG with it in #indieweb-wordpress
#
gRegor
It looks like your POST request to the token endpoint has the info in the query parameters instead of in the body
#
capjamesg[d]
[edit] Ah, I was referring to the guidance in https://aaronparecki.com/2021/04/13/26/indieauth.
#
capjamesg[d]
Which may be out of date now?
#
Loqi
[preview] [Aaron Parecki] How to Sign Users In with IndieAuth
#
Loqi
[preview] [Aaron Parecki] How to Sign Users In with IndieAuth
#
capjamesg[d]
Oh wait, ignore that.
#
capjamesg[d]
I misread it.
#
capjamesg[d]
I thought "You'll make a POST request to the authorization endpoint with the following parameters:" meant query params.
#
gRegor
Lot of moving parts, and since the earlier steps *do* use URL query parameters, easy to mix up
#
capjamesg[d]
gRegor mind trying again?
#
capjamesg[d]
Okay, different error this time.
#
gRegor
Just did. Still failed, but I got further in my logs!
#
capjamesg[d]
code_verifier is not valid
#
gRegor
Ok, I'll have to take a look. Need to step away for a bit though.