In Doorkeeper, we let users put the following code into their website.
This code will produce the widget below.
Having these two pieces of the puzzle in place, the actual code for the widget itself is quite straightforward. We simply iterate through each element with the
doorkeeper-registration-widget class, and replace it with an
iframe with a
src attribute that is the destination of the link with
/widget.html appended on to it:
Then we have an action on our EventsController to render the event specific widget.
That's pretty much it. If you have any comments or suggestions, please leave them below or fork any of the above Gists.