简体   繁体   中英

Website login system - authentication with websocket server

I need a login system for my website through which i can securely authenticate my users on my ws server. The client side code is a javascript function, which is able to send a token over as a packet and the server side code gets the packet and gets the string out of it. From here i could connect with a datebase or whatever.

My problem is, i don't want to send over the username and password, because this seems very unsecure to me. Is there any way to authenticate through a secure way? I just want to let the server check if the user is loggin in and if that's the case which account it is. I was thinking about google auth , but i don't know where to start.

I hope you can help me. Kind regrads,

Simon

Well you can use WSS instead of WS. WSS is secure web socket. It can be implemented over HTTP or HTTPS. See this related post: html5 Websocket with SSL

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM