Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Auth Domain #750

Open
jaysondave opened this issue Nov 30, 2023 · 1 comment
Open

Change Auth Domain #750

jaysondave opened this issue Nov 30, 2023 · 1 comment

Comments

@jaysondave
Copy link

When login with metamask, it is warning like below.
The site you're attempting to sign into doesn't match the domain in the request. Proceed with caution.
image

I deployed energy web repo to my own domain.

Steps to reproduce

  1. Go to switchboard.met3r.com
  2. Login to metamask

https://energy-web-foundation-iam-client-lib.readthedocs-hosted.com/setup/initialization/
The docs says a way to override auth domain in setChainConfig method but there is not any option of auth.domain in ChainConfig interface.

export interface ChainConfig {
    chainName: Chain;
    chainDisplayName: string;
    rpcUrl: string;
    ensRegistryAddress: string;
    ensResolverV2Address: string;
    ensResolverAddress: string;
    ensPublicResolverAddress: string;
    domainNotifierAddress: string;
    assetManagerAddress: string;
    didRegistryAddress: string;
    claimManagerAddress: string;
    stakingPoolFactoryAddress: string;
    credentialRevocationRegistryAddress: string;
    claimsRevocationRegistryAddress: string;
}
@jrhender
Copy link
Collaborator

Hi @jaysondave , apologies for the long delay here. December is quite a busy time at Energy Web but we will endeavour to have quicker replies for future issues!

I think this should be possible to fix in your case as I see that we are setting the default domains for Volta and EWC here:

domain: 'https://switchboard-dev.energyweb.org',

I think our documentation is wrong and you should try setCacheConfig rather than setChainConfig

export const setCacheConfig = (

Please let me know if this helps you out. If not, I can ask the team to continue to investigate further.

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

No branches or pull requests

2 participants