Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Ensure dev mode works with GNAP #1791

Open
3 tasks
Tracked by #1806
birtony opened this issue Jul 15, 2022 · 1 comment
Open
3 tasks
Tracked by #1806

Ensure dev mode works with GNAP #1791

birtony opened this issue Jul 15, 2022 · 1 comment
Labels
type: enhancement New feature or request
Milestone

Comments

@birtony
Copy link
Contributor

birtony commented Jul 15, 2022

  • Figure out a way to run tests without requiring generating test keys in fix: dev mode for wallet #1784
  • Check if auth returns bootstrap data in dev mode and fix any issues
  • Analyze if we need to hard code token expiry used in wallet unlocking for dev mode, or whether we can use the value from bootstrap data returned by auth
@birtony birtony added the type: enhancement New feature or request label Jul 15, 2022
@birtony birtony added this to the 0.1.9 milestone Jul 15, 2022
@birtony birtony moved this to Todo in TrustBloc Wallet/VCS Jul 15, 2022
@birtony birtony changed the title Make gnap token expiry configurable in dev mode Ensure dev mode works with GNAP Aug 23, 2022
@HeidiHan0000 HeidiHan0000 moved this from Todo to In Progress in TrustBloc Wallet/VCS Aug 24, 2022
@HeidiHan0000
Copy link
Contributor

HeidiHan0000 commented Aug 24, 2022

  • Firstly, the auth server url for dev mode seems to be broken. I am unable to reach https://localhost:8044, and replacing agentOpts['hub-auth-url'] = 'https://localhost:8044'; -> agentOpts['hub-auth-url'] = 'https://auth.trustbloc.local:8044'; in options.js gets me past the first error and to the login page.
  • Secondly, I tried removing the following check for production before updating profileOpts with data from getBootstrapData,
         if (process.env.NODE_ENV === 'production') {
            const newOpts = await getBootstrapData(agentOpts, hubAuthURL, dispatch, accessToken);

            if (newOpts?.newAgentOpts) {
              Object.assign(agentOpts, newOpts?.newAgentOpts);
              commit('updateAgentOpts', agentOpts, { root: true });
            }
            if (newOpts?.newProfileOpts) {
              Object.assign(profileOpts, newOpts?.newProfileOpts);
              commit('updateProfileOpts', profileOpts, { root: true });
            }
          }
  • but after that call, profileOps.bootstrap.data.user is empty, although user is set with hardcoded values in initOpts. Maybe it is related to fact that Object.assign cannot deal with nested values and overrides the data.user and data.tokenExpiry that was set from before, I'm not 100% sure.

@rolsonquadras rolsonquadras moved this from In Progress to Todo in TrustBloc Wallet/VCS Aug 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement New feature or request
Projects
No open projects
Status: Todo
Development

No branches or pull requests

2 participants