Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Scobbo · Mar 14, 2013 at 02:38 AM · loginsql

Using wordpress login for unity

So I am making a basic browser game that I will be embedding on my website, I'd like to use the wordpress user database for the game user database so I can display game stats and so that users don't have to create 2 user accounts. Before you say that it is insecure to use mysql I'm sending the log in data to the server and the server will be preforming the query after it sanitizes it then the server tells the client if it was successful or not, the user won't be dealing with any of the database directly. Anyway... I face the problem that the wordpress database encrypts the user passwords and I don't know what it is using, I was wondering if there was a plugin for wordpress (I don't mean the one to upload a unity file) or if there was a way for the game to tell if you are logged in on the wordpress site. Any help would be greatly appreciated.

Cheers, Scobbo

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DirtyFred · Nov 20, 2020 at 03:31 PM 0
Share

Hi,

I would like to achieve the same thing. I have contact recently the wix support team, they told me it is not possible.

Have you been able to to this using wordpress?

Thank you

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer Wiki

Answer by hnsmith · Mar 14, 2013 at 08:51 AM

As opposed to trying to decrypt or accept the password from the user, it would probably be best to just pass the information about login state between wordpress and your unity application. I have not done this myself, but I can think of 3 possible solutions.

Using OAuth

  • http://developer.wordpress.com/docs/oauth2/

  • http://sourceforge.net/projects/dnoa/files/CTP/OAuth2/

If you are hosting directly on WordPress.com you can leverage their OAuth servers, which is the closest approximation to what you want to do. It's a lot of work, and I don't think it's the best way to do it unless there's additional data about the user's wordpress account that you want to manipulate. However, it's an options.

You will need to sign up for an application id and secret, then use an oauth client library in your application.

Using Cookies

http://wordpress.org/support/topic/cookie-data

Essentially they are storing a custom cookie when the user logs in, which their external application can query to check the login state. If you are using your own cookie and not using the one created automatically by wordpress, make sure you also invalidate it when the user logs out of Wordpress.

Using Browser Interop

  • http://docs.unity3d.com/Documentation/Manual/UnityWebPlayerandbrowsercommunication.html

  • http://codex.wordpress.org/Function_Reference/is_user_logged_in

By modifying the Wordpress page that you are using to embed the web-player you can add addiitonal markup to notify your application via SendMessage whether or not the user is logged in, as well as notify them instantly of login changes.

I am leaving this answer open for commenting in case someone more familiar with the Wordpress API has more information about these techniques.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Scobbo · Mar 14, 2013 at 10:14 AM 0
Share

I thought that would fail because unity webplayer elements can't use external files. I'll give it a go, it looks promising

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Help connection to SQL via Json file 1 Answer

Login problems on Answers 4 Answers

How to claim a legacy account if you can't remember the old email? 0 Answers

im using prime31 fb plugin 0 Answers

Login through unity to an online database (SMF encrypted)? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges