Jump to content

Recommended Posts

Hi

I have link a href that when user clicks it will laungh pop up window where user will enter user name and password.

<li><a href="#" onClick="javascript:window.open('https://someOutsideScript');">Link to my page</a> </li>

This basically just validate user and when this OutsideScript gets returned I have couple variables that I can work with.

 

The problem is that once user logs in and it gets validated and it starts filling my form (Link to my Page) if for some reason user clicks on that link again it will start this authorization process all over again.

Can I somehow avoid this by using sessions so user gets validated only once.

 

Any suggestions would be appreciated.

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/284338-session-help/
Share on other sites

External script will check what user entered in popup box(username,password) and will autenticate this with external database. Once it is authenticated it will present user with my page.

Now i am wondering what happens if user clicks in same link again after he has been autheticate. What happens is that once he clicks it again ( by mistake or for whatever reason) this whole thing happens again. ( pop up box,user enters username and password etc) and it goes to validate again.

I would like to prevent that if user is already logged in( if it has already been authenticated?

Link to comment
https://forums.phpfreaks.com/topic/284338-session-help/#findComment-1460415
Share on other sites

Check and see if your SESSION cookie is actually being set. Not sure, but seems like a possibility would be that the browser doesn't have the right cookie to send because the authentication happened in another window.

 

A "modal window" would be preferable in these "Web two point oh" days, anyway. If that helps at all ;-)

Link to comment
https://forums.phpfreaks.com/topic/284338-session-help/#findComment-1460435
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.