Skip to content

Conversation

tuna1207
Copy link
Member

Motivation and Context

v10 upgrade

Jira Link: https://consensyssoftware.atlassian.net/browse/W3APD-4992

Description

Use auth service v10, WS v5
Update init options
Handle v2 project config

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

src/Web3Auth.ts Outdated
this.options.authConnectionConfig ?? [],
"authConnectionId"
);
this.options.mfaSettings = merge(clonedeep(this.projectConfig.mfaSettings), this.options.mfaSettings);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should merge other settings as well here - like sessionTime, userDataInIdToken, mfa settings etc.

Can refer to no-modal sdk as well to check how the config from the user and config from the apis are merged

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arch1995 i updated other fields
for sessionTime and includeUserDataInToken already has default value in constructor

    if (!options.sessionTime) options.sessionTime = 86400;
    if (typeof options.enableLogging === "undefined") options.enableLogging = false;
    if (options.enableLogging) {
      log.setLevel("debug");
    } else {
      log.setLevel("ERROR");
    }
    if (typeof options.includeUserDataInToken === "boolean") options.includeUserDataInToken = true;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants