哦,我们有不少这方面的示例:
https://github.com/topics/discourse-sso
如果您的网站使用 Ruby 和 Rails,您可以将文件 https://github.com/discourse/discourse/blob/master/lib/single_sign_on.rb 复制并粘贴到您的 lib 目录中,以完成大部分繁重的工作,然后添加必要的控制器和路由。