aaronpk / Aperture

Aperture is a Microsub server. Currently in beta.
https://aperture.p3k.io
Apache License 2.0
69 stars 5 forks source link

auth with www redirection has problems #52

Closed kevinmarks closed 6 years ago

kevinmarks commented 6 years ago

When I log in with http://kevinmarks.com I get user 89 and one config. If I then connect using monocle I get an error because monocle authed http://www.kevinmarks.com When I log in with http://www.kevinmarks.com I get user 90. Logging in with monocle then works. I think the 301 redirect from kevinmarks.com to www.kevinmarks.com should change the URL that Aperture stores too

Zegnat commented 6 years ago

I think the issue is that, using IndieAuth\Client, you need to normalise and resolve a user’s URL as two separate actions. (As shown in its internal begin method.)

It looks to me like Aperture is only normalising:

https://github.com/aaronpk/Aperture/blob/5a6690465ae3f9a0f9861dc56ab0c4c08ecda847/aperture/app/Http/Controllers/LoginController.php#L29-L32

aaronpk commented 6 years ago

Thanks @Zegnat. Try again @kevinmarks it should work now.

kevinmarks commented 6 years ago

that works - when i put kevinmarks.com in I get user 90 (so user 89 is an orphan)