Yes, that’s another approach (also easy, I simply forgot
). Just as with my version
, technically, the login will only happen once the user clicks the link to Discourse, but that shouldn’t be a problem. If the user opens Discourse directly, for example through a bookmark, he will have to trigger login manually, but the rest of the process should then be fully automatic.
With this approach, too, you will have to recognize the user by a cookie once Discourse sends him with a token to your application.