How do I create a new Sign Up / Login Button?

Hey Discourse team,

I was looking to create a Login to RSVP button in conjuction with this awesome Events plugin created by pavilion:

I managed to create the button with JS:

I’m having trouble creating a Sign Up / Login path from here. The goal was to create a Sign Up / Login button that redirects them back to the page they came from.

I’ve tried:

  1. /login but that does not redirect the user back to the Topic
  2. When I attemped this api.decorateWidget fix (which has great instructions btw! Kudos :slight_smile: )
    Developer’s guide to Discourse Themes

Whenever I would declare topic-title:before or topic-title:after as the NAME:LOCATION, the helper doesn’t post it anywhere on the screen, I’m guessing this might be in conflict with the events plugin? It works with header-buttons:before

Another thing I was thinking if it’s possible is to just forward the current window as a referer so it redirects back after SSO

Any thoughts?

Cheers!

I found some similar issue posted but those seemed to want to create the login button after posts, I was just hoping to add it near the title. Would I have to actually do createWidget() instead?

Has anyone else tried to re-create the Sign Up / Login button elsewhere on their Discourse site?