Login App Setup client-side login form
This tutorial explains how to setup a simple login form in your web page.
As soon as the Login App is installed and setup according to Login App Installation you can start to implement a client-side login form that can be embedded into any pre-existing web site.
Add a <script> element to the <head> of all of your HTML pages like this:
<html>
<head>
<script src="/p/de.pinuts.cmsbs.auth2.Auth/c/my-app"></script>
[...]
</head>
[...]
(See Tools / Apps / Login and Authorization / My-App / JavaScript snippet / Copy template.)
This script will inject a global variable (window.pinuts.auth2
) into the page's context to allow other UM widgets to react upon who is currently logged-in.
Integrate login form
Go to Tools / Apps / Login and Authorization / My-App / JavaScript snippet and copy the multi-line Copy template to your clipboard. Insert this snippet into your future login page’s HTML source code and open the page in your browser. Try to login using email address and password as specified during Login App Installation.
Now, other Apps' Widgets can make use of an existing user session to pre-fill registration or contact forms: