Open HeadClot opened 5 years ago
Hi @HeadClot, I'd definitely like to add this in the near future. Which client are you using @HeadClot? I hope I can integrate this nicely for Unity3d as well. Cheers!
Hey Endel, That is good to hear that it will be added in the near future. I am currently using the Unity3D integration for my project.
I've started implementing this in the oauth branch today. I'm using the grant
package that supports multiple providers via a JSON configuration file containing all the key/secrets of selected providers.
The way it currently works is:
window.onmessage
/connect/:provider
, which redirects to the provider login page/auth/callback
, which creates (or associates) the provider into his account, and then send a window.opener.postMessage()
containing the user dataTo allow a similar behavior on Unity's native builds (desktop, ios, android, etc), I believe the Unity app would need to create an HTTP server (example), and instead of using postMessage()
, the final URL in @colyseus/social
would send the data through a POST request to the local server Unity has created.
If you have any suggestions or a better alternative please let me know 😅
Hey bit of a feature request but would it be possible to get OAuth2 support for colyseus-social?