I'm developing multiplayer Facebook game in canvas, with Flash client side and C#/.NET at server side. Communication is using Sockets. Flash is loaded inside asp.net page.
I want some best practices from experienced developers about Facebook integration, mainly in Authentication module.
I have come up with these scenarios:
- Flash SDK for facebook (which externally calls JavaScript methods) to authenticate user at startup and other calls.
- ASP.NET server side authentication at loading app(maybe with Javascript SDK). And then with "Game Server"(to which flash is communicating with sockets) using no JavaScript SDK with direct call's to FB api.
Which method is better and why? I think there will be security issues too :|
EDIT I added some details:
It's simple multiplayer game for 4 players. First I'm going to check signed_request posted by facebook canvas in C#'s aspx.cs code, get facebook provided UserId and pass it to flash client, after this flash client connects to server with sockets and sends UserId, than I need to "reAuthenticate" this UserId and check if it was id I firstly got using signed_request(this step is where I'm stuck and need help). after that I think it would be allright