# New Authentication System

Credenza Passport standalone login system. We minimize the amount of meta-data required in order to keep the process as simple as possible, but allow for an extension of the registration process in order to capture additional information.&#x20;

This is the easiest option because there is no normalization of an existing database required. This is also the easiest way to leverage the Credenza Presence UI elements, though we recommend keeping a separate store with additional metadata for CRM purposes.&#x20;

If you are creating a new app but would still prefer a customer login process, there is an easy path to that option. Once the application has retrieved the email address (either through a text box or perhaps inferred from a promotional email), the process can be triggered with the following call:

```javascript
user=await passport.login('magicLink',{'email': emailValue})
```

```javascript
<script>
      const initPassport = async () => {
  	const passport = new window.CredenzaPassport({
  	    chainId: ‘4’,
  	    config: {
                      imageUrl:  'https://img.pagecloud.com/ Ozzie-passport.png',
  	      magic: {
  	        disabled: false,
  	      },
  	    },
      const user = await passport.login('magicLink', {'email': emailValue}). //emailValue holds string with address

      }
      initPassport();  			
</script>
```

If you are using the Presence visual elements, this call is embedded in the login dialog and will automatically execute once a valid email is received.&#x20;

For first-time registrants, the onUpdateProfile event is thrown, so if any metadata is required from the user, you can redirect to an account page or create an interstitial page. For all subsequent logins for the user, onLogin is triggered.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.credenza3.com/credenza-sdk-v5.0/integration/account-provisioning-sign-up/new-authentication-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
