javascript - Protecting Purely Client-Side Backbone Applications -


so implement scrabble game, , wanted 100 percent client-side, i.e. backbone handles game logic. possible protect such solution users weren't able spoof game moves?

is possible?

i think several things must stay in server side, in (almost) all-client solution

  1. security - must have sort of authorization , authentication outside client side
  2. validation - can never trust user generated content, , json model sent server during backbone sync, is, in way, user generated content (as can open console , mess models , save)

i know solutions firebase handle #1 well, i'm not sure handle #2

therefore in case, sébastien's answer great solution, instead of server validation, have peers validate other peers valid move according representation of game. however, how know right? majority wins? don't see way avoid having sort of server side state, "master" , validating each move "valid" move.

one way of doing having server side running on node.js, way can avoid rewriting validation logic in 2 different places. don't need run entire logic on server side, validation part.

there ways run entire backbone app in server side (e.g. this approach) i'm not sure needed here.

few other reasons need server side validation: how know user saving? e.g. if don't have size limit, stops them storing entire pirated ebook database in app, if have no validation on server side, console can push theoretically.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -