aaronpk / indielogin.com

Sign in with your domain name
https://indielogin.com
MIT License
149 stars 24 forks source link

302 and 307 redirects behaving differently #100

Closed valtlai closed 10 months ago

valtlai commented 1 year ago

My site had a 307 redirect from / to /en/ (or /fi/ depending on the Accept-Language request header), which caused the following message to appear when trying to sign in with https://valtlai.fi:

Your GitHub profile linked to https://valtlai.fi/ but we were expecting to see https://valtlai.fi/en/. Make sure you link to https://valtlai.fi/en/ in your GitHub profile.

After changing the status code to 302, I was able to sign in again:

Congrats! You successfully authenticated as https://valtlai.fi/.

Is it intentional that the mostly equivalent HTTP status codes (302 Found, 307 Temporary Redirect) are behaving differently on IndieLogin.com? Can this be fixed?

aaronpk commented 10 months ago

No this was not intentional. I'm pushing a fix that treats 302 and 307 the same. Thanks.