Login Component: Difference between revisions

409 bytes added ,  09:08, 3 October 2023
no edit summary
No edit summary
No edit summary
Line 50: Line 50:
=== 4. Using the Session Key with Other 3B Components ===
=== 4. Using the Session Key with Other 3B Components ===
All other 3B components rely on the <code>sessionKey</code> in local storage to identify the user. Once the <code>LoginComponent</code> sets this key, other components can seamlessly recognize the user and deliver personalized content or functionalities.
All other 3B components rely on the <code>sessionKey</code> in local storage to identify the user. Once the <code>LoginComponent</code> sets this key, other components can seamlessly recognize the user and deliver personalized content or functionalities.
== Session Key ==
The login component generates a sessionKey, a hashed cookie-like string that sticks to the user's browser and has a set expiration date. The Login Component has the ability to check the validity of the sessionKey, and through Apex, developers can also use the sessionKey to extract the contact Id of the logged in user:  <code>RemoteUtils.getContextUserContactId(String sessionkey);</code>


== Conclusion ==
== Conclusion ==