RLG-Web: separate logging in and starting a game.
The user now logs in with a username and password, receiving a token which is then used for any actions requiring authentication. Starting a game is one such action. Games use a different set of id keys. This allows users to supply their passwords once and then play any number of successive games. Also, newly registered users do not need to supply their passwords again.
This commit is contained in:
parent
94e9fa330c
commit
012c86faa8
3 changed files with 193 additions and 98 deletions
|
|
@ -85,14 +85,8 @@
|
|||
<span onclick="textsize(true)">Larger</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal" id="login">
|
||||
<form id="loginform" action="/login" method="post">
|
||||
<div>
|
||||
Name: <input type="text" name="name" id="input_name">
|
||||
</div>
|
||||
<div>
|
||||
Password: <input type="password" name="pw" id="input_pw">
|
||||
</div>
|
||||
<div class="modal" id="startgame">
|
||||
<form id="startform" action="/play" method="post">
|
||||
<div>
|
||||
Choose game: <select name="game" id="input_game">
|
||||
<option label="Rogue V3" value="rogue3">Rogue V3</option>
|
||||
|
|
@ -102,11 +96,24 @@ Choose game: <select name="game" id="input_game">
|
|||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="Play" onclick="formlogin(event)">
|
||||
<input type="submit" value="Play" onclick="startgame(event)">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal" id="login">
|
||||
<form id="loginform" action="/login" method="post">
|
||||
<div>
|
||||
Name: <input type="text" name="name" id="input_name">
|
||||
</div>
|
||||
<div>
|
||||
Password: <input type="password" name="pw" id="input_pw">
|
||||
</div>
|
||||
<div>
|
||||
<input type="submit" value="Log in" onclick="formlogin(event)">
|
||||
</div>
|
||||
</form>
|
||||
<div class="rbutton" onclick="setmode('register')">Register</div>
|
||||
</div>
|
||||
<div class="modal" id="register">
|
||||
<form id="regform" action="/addacct" method="post">
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue