Authentication Integration
The Authentication Integration renders a link that either directs customers to the login page if logged out, or to their account page if logged in. By default, this integration will either display the text "Login" or "My Account" depending upon the user's state. We recommend putting this snippet into your main navigation.
Example Snippet
Parameters
Required
data-mariana-auth-link
: This attribute identifies the element as the authentication integration.href
: The value of this attribute is where the user will be directed on click. This value should be the location of your "Account" view.
Details
The integration is an empty anchor link. The href
parameter should equal the URL of your Account view. For example, my account view is on my "account" page: https://mycoolsite.com/account/
. In this case, the attribute href
should have the value /account
.
Optional
data-mariana-logged-in-text
: Text that shows when the user is logged in.data-mariana-logged-out-text
: The text that shows when the user is logged out.
Details
You can customize the text by setting the data-mariana-logged-in-text
attribute and/or the data-mariana-logged-out-text
attribute, respectively.
Javascript snippet
The javascript snippet in the 'Getting Started' section must be present on any page that this integration is present.