BoltAuth / Auth

Auth extension for Bolt
MIT License
16 stars 17 forks source link

Update `Redirect.php` - Fix #16 #20

Closed xiaohutai closed 6 years ago

xiaohutai commented 6 years ago

Not sure if this is the proper fix, because it seems a bit hacky to me.

xiaohutai commented 6 years ago

Wait, it seems this error only occurs when you haven't triggered something first. Because it's not happening anymore 🤔

I still need to familiarize with this extension.

SvanteRichter commented 6 years ago

@xiaohutai You mean you can't repro the original issue?

xiaohutai commented 6 years ago

The error happened on a clean install, but sometime later it never happened anymore. Not sure what's going on.

xiaohutai commented 6 years ago

Hm, maybe I didn't saved it correctly when it didn't occur.

This fix should work, but not sure if it is proper.

artggd commented 6 years ago

To repro the original issue, you'll need to enter this condition. Having no redirect in your request and no redirects: {login: /auth/profile} in app/config/extensions/auth.boltauth.yml.

I will provide a fix for the abovementioned condition in another PR soon. This one could still be merged I guess, forcing a __toString shouldn't hurt 🙂

SvanteRichter commented 6 years ago

This should have been fixed by #22, but let me know if it isn't and I'll merge this one too.

SvanteRichter commented 6 years ago

Reopening since it might fix an issue reported on slack.

SvanteRichter commented 6 years ago

Seems to fix the other redirect problem not fixed by #22, so merging :)