简体   繁体   中英

How to authenticate a website member in a Metro-style App

I have a website that uses WebMatrix user authentication (login/register pages) and I am making an app in Windows 8 release preview and would like to know if it is possible to authenticate users of my app (let users of my app sign in to my app) if they are registered members of my website? And if they are not, allow them to register through my app - but it appears that remost db connections are not possible in Metro apps - so I don't know what to do. Can somebody please help?

I've been searching for weeks but there still isn't a whole lot of official documentation out there.

You should never ever allow any client or user program to access your database directly (not even read access). People WILL abuse it one way or another and they might try exploits to gain write access if their access is restricted to reading. If you'd like a prominent example, Super Meat Boy did that exactly, and they got lots of database issues and abuse over last year's christmas days (while there game was on (Steam) sale, so they got lots of additional upset players!).

I've never used WebMatrix, so I might be a bit off here, but in general you should have several possible approaches - all being better than doing direct database access:

  • Use some provided remote access (this might be some extra class or addon or whatever; IF available).
  • Write your own remote access tool. This would essentially be some special website accepting/returning text or data interpreted by your program. Eg you could post the login credentials in a HTTP POST request and it could return ok or failed or something like that.
  • Essentially fake a web browser and access the standard URLs/scripts/systems provided by WebMatrix.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM