Passport SDK v5.0
  • Overview
  • Account Lifecycle
  • Integration
    • Client Side Enablement
    • Credenza Presence (Optional Visual Elements)
    • Account Provisioning (Sign-up)
      • New Authentication System
      • Existing Authentication System - New Customer
      • Existing Authentication System - Existing Customer
  • Passport Subsequent Logins
  • Post-Login Capabilities
    • Account Information Access
    • Blockchain Wallet Access
  • Smart Contract Interactions
    • Instantiating The Contract Object (Server-Side)
    • Instantiating The Contract Object (Client-side)
    • Calling Contracts
  • Monetary Transactions
  • Appendix I: Passport Configuration Options
    • Magic
    • Ethers.js
    • Installation
    • Usage
    • Passport Instance Properties
    • Passport Static Properties
    • Modes
    • Supported query params
  • Transaction UI v3.0 (now part of Passport)
    • Magic
    • Ethers.js
    • Installation
    • Usage
    • Apple Pay
    • Google Pay
    • Methods
    • Events
  • Appendix II: MetaMembership Contract Access
  • Appendix III: Ledger Contract Access
  • Appendix IV: Decentralized Commerce Configuration
Powered by GitBook
LogoLogo

©2023 Credenza. All rights reserved.

On this page
  1. Integration
  2. Account Provisioning (Sign-up)

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.

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.

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:

user=await passport.login('magicLink',{'email': emailValue})
<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.

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.

PreviousAccount Provisioning (Sign-up)NextExisting Authentication System - New Customer

Last updated 1 year ago