简体   繁体   中英

How to redirect user to the same URL after login

I'm trying to operate on a project which I haven't written. There is an initial login page localhost/8000 .

If you log in using Google (OpenID) it redirects you to http://localhost:8000/?state=%5B%22353487%22%2C%22http%3A%2F%2Flocalhost%3A8080%2F%22%5D&code=4%2F0AdQt8qgPl7JOSDJnJTxZzXsJ-uaTQD6zIN3OWBEjeeaK5oJvTkIjG2iyQAf6UYdglIeJcA&scope=email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+openid&authuser=0&hd=domain&prompt=consent which contains the site itself with all the functions.

I'm trying to create a non-Google login on the same initial page localhost/8000 and I want to achieve the same redirect as Google. How can I do since it's on the same link localhost/8000 and it only adds some parameters in the URL requests? Thanks

You can not do that for security reasons, everybody could intercept the plaintext password input as a "man in the middle" and could trick others to beliefe he log into google. That is called phishing.

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