Skip to content

Troubleshooting Guide

This troubleshooting guide will cover common issues that users may encounter when using the Arcana Auth SDK for user onboarding and signing blockchain transactions. Whether you are experiencing issues logging in, accessing your wallet, or making transactions, we hope this guide will help you get back up and running smoothly.

Configuration Issues


Cannot turn off UI for wallet mode

Arcana Auth SDK allows developers to manage the dApp user experience for signing blockchain transactions with the Arcana wallet.After installing the Auth SDK, during integration with the dApp, create a new AuthProvider instance and specify appropriate wallet visibility mode through the alwaysVisible parameter. See the Arcana wallet configuration guide for details.

Aggregate login does not work with GitHub

Scenario

Developer logs into the Arcana Dashboard using social authentication provider P1. For the very first login, the dashboard brings up 'create new dApp' workflow allowing the developer to register a new application and obtain a unique App Address say Addr1. Now if the developer logs out and logs back in using a different social authentication provider P2, Arcana Network can recognize that the login is by the same developer so it brings up the 'monitor dashboard' screen for appAddress=Addr1 that was earlier registered by this same developer. This happens provided the developer has the same email ID associated with both providers P1 and P2.

If the user has a different email ID associated with providers P1 and P2 then during the second login using a different provider, the same developer cannot be recognized and associated with the developer that registered the appAddress=Addr1. The dashboard considers login with a new provider (different email ID) as a new identity and assumes this is a fresh login by a new developer. It brings up 'create new dApp' workflow allowing this 'new' developer to register the application.

If one of the provider is GitHub, then even if the same email ID is associated with all providers, Arcana Network may fail to associate GitHub identity of the same developer with other providers. Instead of bringing up the 'monitor dashboard' for appAddress=Addr1, it brings up the first login specific workflow, 'create new dApp' and expects the same user to register a new application.

How can a developer make sure that Arcana Network can successfully associate the GitHub account of a developer with other social authentication providers, if same email ID is used in every provider account?

Solution

The aggregate login feature of Arcana Network allows an application developer to login into the dashboard using any supported social authentication mechanism and register and configure their application. The same application is associated with multiple social accounts that the developer uses to login. This feature works only if the developer has the exact same email ID associated with all the social OAuth providers. This allows Arcana Network to recognize the developer irrespective of any social OAuth used to login into the dashboard. What this means is, every time this developer logs into the dashboard, (s)he will be able to see the same application that is configured by them.

With GitHub, the behavior is different, only if the GitHub user settings are not in place. To ensure the same behavior as other social authentication providers in case of GitHub, make sure that you specify the following details in GitHub Settings:

  1. In your GitHub profile setting, allow your email to be visible
  2. In the GitHub Email Settings preferences, make sure you do not select the checkbox which says 'Keep my email address private'.

Refer to figure below for details:

GitHub Profile email visible GitHub Email Settings not private


Auth Issues


Error: Wallet is not initialized.

Wallet Not Initialized Error

This error is caused due to incorrect integration of the Auth SDK. While integrating with the Auth SDK, you need to perform the following key steps in the suggested order:

First, install the Auth SDK.

npm

npm install --save @arcana/auth

yarn

yarn add @arcana/auth

CDN

<script src="https://cdn.jsdelivr.net/npm/@arcana/auth"></script>
<script src="https://unpkg.com/@arcana/auth"></script>

Next, create an AuthProvider instance.

const { AuthProvider } = window.arcana.auth // From CDN
//or
import { AuthProvider, CHAIN } from '@arcana/auth' //From npm
const appAddress = '445007f942f9Ba718953094BbeeeeeB9484cAfd2' // App Address Example

const auth = new AuthProvider(`${appAddress}`, {
  position: 'left', // defaults to right
  theme: 'light', // defaults to dark
  alwaysVisible: false, // defaults to true which is Full UI mode
  chainConfig: {
    chainId: CHAIN.POLYGON_MAINNET,
    rpcUrl: '',
  },
})

Lastly, initialize the AuthProvider. This is important as it initializes the embedded Arcana wallet. Only after a successful login, the wallet is visible in the context of an application.

try {
  await auth.init()
} catch (e) {
  // Handle exception case
}

Caution

If an application integrates with the Auth SDK, it must follow these steps above before calling any other SDK method such as isLoggedIn() or connect() or loginWithSocial('providerstring').


Last update: January 26, 2023 by shaloo