Basic Authentication
Drag and drop both client and master scenes to hierarchy panel.
Master Scene
This scene has one master server component that has several modules such as Ping and Auth. You can also see Base SMTP component that is responsible for sending email to newly created users.
Database accessor factory helps you to communicate with database. In our case we use Lite DB as backend database provider.
Client Scene
Let's talk about client scene that holds all UIs to run user authorization logic. We are interested in SignupView, SigninView, PasswordResetView, PasswordResetCodeView, EmailConfirmationView.
SignupView
This view sends request to master server auth module to create new user account in database using username and password. After the new account is created user receives email that say that he must confirm his email.
SigninView
This view sends request to sign in existing user or create new guest user.
If you want to play as guest user just click Sign In As Guest button. If you have and account then enter username and password and click Sign In.
Once you are signed in and if AuthModule requires email confirmation you will be prompted to do this.
EmailConfirmationView
Click Get Confirmation Code button. After this you will receive email with confirmation code you should enter in Confirmation Code input field.
PasswordResetCodeView
Works the same as email confirmation view.
- Enter your email.
- Click Get Reset Password Code button.
- Receive email with reset password code.
- Then enter this code in next prompt view. Also create new password.