I’d definitely follow our official SSO guide first Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)