Redirecting to a web page from another web page by clicking the hyperlink along with token attached

回眸只為那壹抹淺笑 提交于 2019-12-12 05:30:40

问题


I have a scenario where I have a person who tries to access the url of my webpage (Which is written in ANGULARJS) from his webpage. My webpage is token protected. While the person clicks on the hyperlink from his webpage, he will send a token along with the click. I should then redirect to home page instead of login page in case he sent me a correct token.

Question 1: How to get the token that the person sent while redirecting to my webpage?

Question 2: Usually I have a login page and in case any user tries to access the contents of my webpage, i check whether the user is logged in by checking the token that I store in cookie. But in my case I couldn't even check that because I couldn't store the token that the person sents while trying ton access my webpage, because I don't know if someone is accessing my webpage from the frontend?

I would be glad if anyone has a solution for this

来源:https://stackoverflow.com/questions/43137291/redirecting-to-a-web-page-from-another-web-page-by-clicking-the-hyperlink-along

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!