TSphinxWebLogin.Login Method
Starts the process to login to the application.
Remarks
If the user is already logged in, then Login method just fires the OnUserLoggedIn event with the information about the logged user. If the user is not logged in, the user browser is redirected to the Sphinx login page. From there user can authenticate (by entering login credentials), or create a new account (if enabled), recover password, confirm registered e-mail, among other operations. If the user effectively logs in by providing credentials, then Sphinx server redirects the browser back to the URL provided in the RedirectUri property - which should be set to the web application URL itself. Upon reload, the web application will process the authorization code provided in the redirect URL and use it to request the identity and access tokens to the Sphinx server. Once the tokens are retrived, they are saved in browser local storage, which effectively indicates the user is logged in. Then the event OnUserLoggedIn will be fired providing all the information about the logged user.
Syntax
Unit: Sphinx.WebLogin
procedure TSphinxWebLogin.Login;