New Topic URL - Lost if not logged in

AI-generated summary

The discussion addresses a bug where the ‘New Topic URL’ feature fails to redirect to the composer after logging in via Single Sign-On (SSO) methods like GitHub or Facebook, although it works correctly with regular logins. yyhmsg reported that while the pre-filled URL prompts for login, the user is redirected to the front page instead of the new topic window after authenticating. codinghorror asked for clarification on the login type and requested reproduction on try.discourse.org. yyhmsg confirmed the issue occurs with SSO and noted that try.discourse.org was inaccessible via HTTPS at the time. techAPJ verified the issue, confirming that the feature does not work when logging in via social login methods. A fix was subsequently implemented and deployed via commit ad98f27, resolving the issue for SSO users. yyhmsg thanked the team for the quick resolution.

Continuing the discussion from Compose a new pre-filled topic via URL:

@techAPJ I was just exploring the new topic url and just tried clicking on a new topic url when not logged in - it then asks you to login which is great, however, after you are logged in you just go to front page - not to the new content window. So I don’t think this is fixed yet. As something else changed that makes the session variable not hold?

I just tried visiting this URL when not logged in – Discourse Meta

The feature is working as expected for me, as soon as I provided my credentials, the pre-filled composer opened.

Are you referring to SSO or regular login? Can you repro on try.discourse.org?

I had only tried sso (github and facebook if it matters…) - which does not work - a regular login does. I think I understand some of the complexity of this with sso logins, but this type of functionality would be awesome for my site at least. Is it possible with sso?

Oh, and I reproduced this on my site and on meta, but try. is not responding right now so I couldn’t try it there…

Just an update try. wasn’t down it just doesn’t work with https and you get a connection refused error… Either way, with that figured out I tried this on try. just now with

and it doesn’t work there either with sso…

Try does not use SSO. Can you repro this @techapj?

I understand your issue now. I can confirm that this feature is not working when logging in via social login method (Google/Twitter/Facebook).

Working on a fix now. Fixed via:

https://github.com/discourse/discourse/commit/ad98f270c925e7cbdfdf7d7687605b49656503b6

Thanks for reporting this @yyhmsg :gift_heart:

Awesome! Thanks for the quick fix! I’ll give it a shot at the next update of my site.