Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.
PLEASE READ - Webmaster Support Forum
This forum will be retired in the near future. Please direct all queries to our dedicated GitHub support page https://github.com/vatsimnetwork/developer-info/discussions 
Here you can find documentation on our services and we are continuing to migrate pertinent information into the Wiki pages https://github.com/vatsimnetwork/developer-info/wiki

VATSIM SSO + Wordpress: Registration issue


Steven Fauconnier
 Share

Recommended Posts

Steven Fauconnier
Posted
Posted

Hi all,

 

For a few weeks we've been having issues with our SSO plugin.

The problem is as follows: Whenever a new member logs in via SSO, his/her account is created in our DB (so far so good). However, he/she's not logged in. Instead he/she gets this (used test details from the demo environment):

 

CaptureSSO.JPG

 

If they try linking the account, they need a p[Mod - Happy Thoughts]word (which they do not have). If they re-register, they get an error since the account already exists.

 

My current workaround is as follows:

 

- I need to login as admin to generate them a p[Mod - Happy Thoughts]word in wordpress.

- Using these details they need to log in once (instead of using the VATSIM SSO thus).

- Once that is done, manually they need to go to http://beluxvacc.org/oauth/

- Here they log in with their VATSIM account data. A message saying "your account has been linked to VATSIM SSO" will appear.

 

Now that their local account has been linked with their SSO account, they can start logging in using our SSO.

 

=> So in brief, the creation of the account is fine. The linking is not and need to happen via manual intervention ... which is a huge pain

 

Any ideas? Suggestions?

Belux vACC Director (ACCBE1)|Mail: steven.fauconnier(at)beluxvacc.org

------------------

ATSimTest Lead - VATSIM Europe Division |Mail: steven.fauconnier(at)vateud.net

Link to comment
Share on other sites

Steven Fauconnier
Posted
Posted

Oh, and logging in via an existing account through SSO luckily does not give any issue at all

Belux vACC Director (ACCBE1)|Mail: steven.fauconnier(at)beluxvacc.org

------------------

ATSimTest Lead - VATSIM Europe Division |Mail: steven.fauconnier(at)vateud.net

Link to comment
Share on other sites

Nestor Perez
Posted
Posted

Hi Steven!

 

Could you explain exactly how you're using VATSIM's SSO? I am failing to see why the user would have to use "your SSO" or which accounts it is that you're trying to link. The main point of using SSO is that each user only needs one account (the VATSIM one) and this one is the only one they'll need to be identified on a 'VAT-Site'. Which is the other account you're linking it to?

 

And about the error: If the only thing you're getting is the "Email already exists", that's probably caused by the fact that all demo SSO accounts have the same email address (this doesn't/shouldn't happen on the live SSO environment, as each user should be a completely different user and hence have a completely different email). Do you have any database/code constraints which force an email to be unique? Are you using any SSO library? Which one?

Me.

Link to comment
Share on other sites

Steven Fauconnier
Posted
Posted

Hi Nestor,

 

Upon registration via VATSIM SSO, the user's details are injected into our wordpress database (name, cid, e-mail etc). As such they get a WordPress account on our website (however they do not get the p[Mod - Happy Thoughts]word). In a second step this WordPress account is linked to their VATSIM credentials, which will allow them to be automatically logged in on our website once they log in via VATSIM SSO. It's this second step that basically seems to be giving us issues since - if we do it manually - everything works just fine. Yet, until we started having these problems, people would simply register and they would be logged in on our website without any h[Mod - Happy Thoughts]le.

 

The problem also happens with live data, incl. people that did not register to our server yet.

Belux vACC Director (ACCBE1)|Mail: steven.fauconnier(at)beluxvacc.org

------------------

ATSimTest Lead - VATSIM Europe Division |Mail: steven.fauconnier(at)vateud.net

Link to comment
Share on other sites

Nestor Perez
Posted
Posted

AFAIK nothing has changed on our side, so I guess we can both agree the issue is something on your side. Have you updated the WP version or any of the plugins you use with it lately? And are you using any VATSIM SSO Library (like https://wordpress.org/plugins/blaatschaap-sso-vatsim/ for example)?

 

Check your DM on the forum as well, pls

Me.

Link to comment
Share on other sites

Steven Fauconnier
Posted
Posted

Yh we use the blaatschaap

Belux vACC Director (ACCBE1)|Mail: steven.fauconnier(at)beluxvacc.org

------------------

ATSimTest Lead - VATSIM Europe Division |Mail: steven.fauconnier(at)vateud.net

Link to comment
Share on other sites

Nestor Perez
Posted
Posted

Hi Steven, sorry for the delay. To be honest, I have no 'wild-guesses' about this...

 

When I tried registering, I was redirected to a blank page after login. This is what PHP tends to do if there's an error somewhere in the code and error reporting is disabled. Could you have a quick look at the code which handles the page to which the user is redirected after a succesful login?

 

Cheers,

Me.

Link to comment
Share on other sites

  • 2 weeks later...
Steven Fauconnier
Posted
Posted

Apologies for the delay, I was on holidays. I will try to see if I can get error reporting activated.

Belux vACC Director (ACCBE1)|Mail: steven.fauconnier(at)beluxvacc.org

------------------

ATSimTest Lead - VATSIM Europe Division |Mail: steven.fauconnier(at)vateud.net

Link to comment
Share on other sites

  • 3 months later...
Owen Kane
Posted
Posted

I'm curious to know the results of your findings Steven Fauconnier. We are experiencing the exact same issue, which we suspect is a plugin we use that reads the WP User List. I suspect if the email address for the user in the WP user database is blank or the same as another user it causes an issue with Vatsim SSO where users are unable to login and are directed to a "Registration" Site!

 

Through me for a loop but working with the developer to investigate the issue.

CZEG-EDMONTON-2020-LOGO-C-LOGO-400W-OKSIG.png
Link to comment
Share on other sites

Steven Fauconnier
Posted
Posted

Basically we never found the problem. However, upgrading our php to the latest version solved the issue.

Belux vACC Director (ACCBE1)|Mail: steven.fauconnier(at)beluxvacc.org

------------------

ATSimTest Lead - VATSIM Europe Division |Mail: steven.fauconnier(at)vateud.net

Link to comment
Share on other sites

 Share