PHP Classes

External sign up page

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  External sign up page  >  (Un) Subscribe thread alerts  
Subject:External sign up page
Summary:What is the best way to have signin page in a popup window.
Messages:5
Author:Luke Grenncastle
Date:2014-03-25 23:19:10
Update:2014-03-30 01:47:48
 

  1. External sign up page   Reply   Report abuse  
Picture of Luke Grenncastle Luke Grenncastle - 2014-03-25 23:19:10
Hi,

First thank you for this great class. Very well done and easy to use. I would like to have the provider sign in page to popup in an external page. Could you please help/indicate the best way and where to implement such fonctionnality and if you plan to implement this in the future ?

Thanks for your help!

  2. Re: External sign up page   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-03-26 00:44:47 - In reply to message 1 from Luke Grenncastle
Currently you can create a sub-class and redefine the Redirect function. There you can do whatever you need to make your pop-up open in the redirect URL.

  3. Re: External sign up page   Reply   Report abuse  
Picture of Luke Grenncastle Luke Grenncastle - 2014-03-26 02:24:04 - In reply to message 2 from Manuel Lemos
Hi Manuel,
Would be very appreciated if you could give me more details as to where in the code should I implement such subclass. :) The idea would be to get the sign in page in a popup window whenever the required access token/code are not valid.

Thanks for your help!

  4. Re: External sign up page   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-03-26 20:16:25 - In reply to message 3 from Luke Grenncastle
You can create a sub-class like this:

class my_oauth_client_class extends oauth_client_class
{
Function Redirect($url)
{
echo 'some HTML and possibly some JavaScript to open the popup with '.$url;
}
};

I am not sure how you intend to implement the popup with HTML but keep in mind that many browsers block popup windows these days.

Also, you need to have some logic in your script so when the OAuth server redirects back in the popup, maybe you want to close the popup and continue in the main browser window.

  5. Re: External sign up page   Reply   Report abuse  
Picture of Luke Grenncastle Luke Grenncastle - 2014-03-30 01:47:48 - In reply to message 4 from Manuel Lemos
Thank you Manuel.
Will give it a try a let you know the results.
Thanks for your help!