After a few tests it appears that redirections with an anchor from WP works only if the user is already logged on Discourse.
Works in this case : WP not logged in → Discourse already logged in → logs user to WP
And not in this one : WP not logged in → Discourse not logged in → user logs in Discourse → logs user to WP
But that doesn’t matter much after all.
Thank you for your replies. ![]()