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