ng-alain模板,使用oidc-client連接ID4登錄成功后,調(diào)用redirect uri時(shí),一直顯示以下錯(cuò)誤:Angular is running in the development mode. Call enableProdMode() to enable the production mode.WebSocket connection to 'ws://localhost:4200/sockjs-node/370/l13yjpbj/websocket' failed: WebSocket is closed before the connection is established.頁面不斷重復(fù)登錄界面跳轉(zhuǎn)到redirect 地址的畫面,請(qǐng)問這個(gè)是什么原因?剛學(xué)前端不久,對(duì)websocket不是很熟。@cipchk
1 回答

HUX布斯
TA貢獻(xiàn)1876條經(jīng)驗(yàn) 獲得超6個(gè)贊
今天下午終于找到問題原因了,是我的redirect_url有問題。
首先,我項(xiàng)目中寫的redirect地址是http://localhost:xxxx/callback(ID4也一樣),瀏覽器顯示的實(shí)際地址為http://localhost:xxxx/#/callback, 所以ID4一直跳轉(zhuǎn)不成功。
當(dāng)我把地址改為http://localhost:xxxx/#/callback時(shí),ID4跳轉(zhuǎn)的地址變成了http://localhost:xxxx/#/callbackid_token.....略,這是我接下來要解決的問題。
對(duì)了,websocket顯示關(guān)閉時(shí)正?,F(xiàn)象(登錄跳轉(zhuǎn)后關(guān)閉)~
- 1 回答
- 0 關(guān)注
- 1386 瀏覽
添加回答
舉報(bào)
0/150
提交
取消