volatiletech / authboss

The boss of http auth.
MIT License
3.81k stars 207 forks source link

307 redirect on login after setting JSON API flag #285

Closed anselm94 closed 4 years ago

anselm94 commented 4 years ago

Authboss doesn't map readJSON parameter in defaults.SetCore to CorceRedirectTo200 parameter in defaults.Redirector

The signature of defaults.NewRedirector has to be updated to include the API flag param

https://github.com/volatiletech/authboss/blob/020487826a5df9ed53b5ff2a749432bb8fec7c30/defaults/responder.go#L61

aarondl commented 4 years ago

Yeah. It's a sad reality but it would have been a breaking change so we opted not to make it, there are many such issues we'd like to change in v3. You can still use SetDefaults and then convert & set the value yourself in the Redirector, or you can create your own version of SetDefaults and ensure that its set appropriately. Thanks for raising the issue.