2014-02-12 28 views
0

我使用​​提供的示例創建自定義Oauth2提供程序。這很容易,我使用option :client_options, {site: "https://sub.dom.is?id=myId"}爲我的發行人,但當重定向發生時,我得到一個404,當我檢查URL時,我可以看到,實際上是https://sub.dom.is/oauth/authorize?id=myID,當然這是錯誤的,因爲已經添加oauth/authorize到URL ..爲什麼omniauth-oauth2策略將/ oauth/authorize添加到我的網站url中?

有沒有人知道爲什麼?或誰添加它,然後我該如何擺脫它?

回答

1

我找到了答案anti-pattern.com ...當我只提供omniauth-oauth2將添加oauth /授權給它的網站作爲默認。但是,如果我提供了authorize_url這樣的選項:client_options,{site:「https://www.dom.is」,authorize_url:「https://sub.dom.is?id= myID」}授權用戶時會使用autorize_url。

相關問題