Closed kennethormandy closed 4 years ago
This looks great to me actually! Thank you!
Actually, I may tweak this just a little.
@kennethormandy Okay, I just released 2.1.7 with the ability to do this. I went a different route than what this PR proposed, so make sure you check the docs. I made the following changes:
Updated the docs with examples here: https://github.com/venveo/craft-oauthclient#modifying-the-authentication-flow-conditionally
This is working well for me, thanks so much!
I was looking for a way to set the redirect after the OAuth flow when making the link as a link, rather than a form submission. The place I’m adding the link is already inside a form in the Craft control panel, similar to the “+” add Token button in the plugin UI, so it isn’t practical to make it a form.
Would adding the redirect URL to the context + this PR, be a reasonable way to add that functionality?
Or is it intentionally only done via a POST request right now?
Alternatively, could this be done in the
EVENT_GET_URL_OPTIONS
event?Another option that might solve it for me would be to make the default redirect value the page you were originally on, rather than
oauthclient/apps
.I can open a different PR if any of those other approaches sound more appealing to you, or maybe I am missing something. Thanks very much!