我正在嘗試使用 Ory Kratos 并讓用戶使用他們現有的 Microsoft 帳戶登錄。在
這就是我在參考實作中所做的,我按照此處的檔案進行了嘗試:https : //www.ory.sh/kratos/docs/guides/sign-in-with-github-google-facebook-linkedin/#microsoft
我的參考實作的鏈接:https : //github.com/atreya2011/go-kratos-test/tree/microsoft-oidc
盡管我的參考實作是在 Go 中實作的,但您可以將其調整為您選擇的任何其他語言!
組態檔詳細資訊在這里:https : //github.com/atreya2011/go-kratos-test/tree/microsoft-oidc/config
要試用參考實作,您需要安裝 Go 和 Docker,然后執行以下操作:
- 在本地克隆存盤庫。
docker-compose up在一個終端會話中運行- 在另一個終端會話中,運行,
go run main.go - 然后在瀏覽器中打開,
http://localhost:4455/login
不要忘記使用您client_id和client_secret您從 Microsoft 獲得的配置更新!
希望我的回答有幫助:)
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/364316.html
