![Picture of Martin Kirk Picture of Martin Kirk](/graphics/unknown.gif)
Martin Kirk - 2017-01-26 19:24:51
This library seems to be exactly what I was looking for, and I have had no problem in creating a configuration and login module for my system. For this, many thanks.
I do have one problem which I have so far failed to slve, and I would appreciate if anypne could give me some pointers, or even an example.
I need to be able to call the login process from any page on our site, and have the process return to that page upon a succesful login. In order to do that I need to be able to pass the URL of the target page through the login process.
Looking at the code, it looks as if I should be able to put data into the $_SESSION['OAUTH_STATE'] variable, and have that returned along with the access token to the redirect URL.
Looking at what is returned, I am assuming it is in ssession_state parameter.
The data I am placing in the $_SESSION['OAUTH_STATE'] is json encoded, and then base64url endoced. However, trying to apply the 2 decodongd to the returned data (in the reverse order) isn't returning any usable data.
Of course, it may be that I am taking the wrong approach altogether, so any suggestions gratefully received.