This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-10-28 13:02:00

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Help with verifying Scratch Password!

Im making an "app" and I need a way for javascript to verify the users password.

I'm using the: http://scratch.mit.edu/api/authenticateuser

url and it works fine until javascript has to read the iframe. Since it's on a different domain it can't, any ideas?


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#2 2012-10-28 13:04:52

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Help with verifying Scratch Password!

unless it's crucial that it has to be in javascript, have it use ajax to call a local php file that will authenticate it


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#3 2012-10-28 13:19:25

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Re: Help with verifying Scratch Password!

SJRCS_011 wrote:

unless it's crucial that it has to be in javascript, have it use ajax to call a local php file that will authenticate it

it doesnt matter, I used $().load and it works like a charm!

Thanks anyway though!  smile


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

#4 2012-10-29 09:03:17

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Help with verifying Scratch Password!

I would discourage using just client-side JavaScript to authenticate a user, since people could modify the code and fake the authentication.  smile

Offline

 

#5 2012-10-29 09:11:33

Servine
Scratcher
Registered: 2011-03-19
Posts: 1000+

Re: Help with verifying Scratch Password!

Magnie wrote:

I would discourage using just client-side JavaScript to authenticate a user, since people could modify the code and fake the authentication.  smile

I'm using PHP to finalize it  smile

PHP in my opinion is one of the best programming languages. You can use variables in strings and it recognizes it, and it's SO hard to hack into!


http://bluetetrarpg.x10.mx/usercard/?name=Servine

Offline

 

Board footer