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

Cyan / mainnet - solana api call error #921

Open
soydulceangelina opened this issue Nov 22, 2022 · 0 comments
Open

Cyan / mainnet - solana api call error #921

soydulceangelina opened this issue Nov 22, 2022 · 0 comments

Comments

@soydulceangelina
Copy link

Describe the bug

The implementation for Testnet is working as usual, but since a few days in Cyan it is not working.

We have w3a + auth0 implemented, we are using version "1.2.0".

curl 'https://api.mainnet-beta.solana.com/' \ -H 'authority: api.mainnet-beta.solana.com' \ -H 'accept: application/json' \ -H 'accept-language: en-US,en;q=0.8' \ -H 'content-type: application/json' \ -H 'origin: https://minteo.com' \ -H 'referer: https://minteo.com/' \ -H 'sec-ch-ua: "Brave";v="107", "Chromium";v="107", "Not=A?Brand";v="24"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "macOS"' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: cross-site' \ -H 'sec-gpc: 1' \ -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36' \ --data-raw '{"id":4227995961619531,"jsonrpc":"2.0","method":"getHealth","params":[]}' \ --compressed

To Reproduce

Our integration code:

`import { Web3AuthCore } from '@web3auth/core'
import { WALLET_ADAPTERS, CHAIN_NAMESPACES } from '@web3auth/base'
import { OpenloginAdapter } from '@web3auth/openlogin-adapter'
import {
web3AuthClientId,
auth0ClientId,
web3AuthChainId,
openLoginAdapterNetwork,
openLoginAdapterVerifier,
auth0Domain
} from 'app/config/env'

let w3auth

const getWeb3Auth = async () => {
if (!w3auth) {
w3auth = new Web3AuthCore({
clientId: web3AuthClientId,
chainConfig: {
chainNamespace: CHAIN_NAMESPACES.SOLANA,
chainId: web3AuthChainId // Please use 0x1 for Mainnet, 0x2 for Testnet, 0x3 for Devnet
}
})

const adapter = new OpenloginAdapter({
  adapterSettings: {
    clientId: web3AuthClientId as string,
    network: openLoginAdapterNetwork as any,
    uxMode: 'redirect',
    loginConfig: {
      jwt: {
        name: 'our_name',
        verifier: openLoginAdapterVerifier as string,
        typeOfLogin: 'jwt',
        clientId: auth0ClientId
      }
    }
  }
})

w3auth.configureAdapter(adapter)

await w3auth.init()

}
return w3auth
}

const login = async (token: string) => {
const provider = await getWeb3Auth()
const web3authProvider = await provider.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
loginProvider: 'jwt',
relogin: false,
extraLoginOptions: {
id_token: token,
domain: auth0Domain,
verifierIdField: 'sub'
}
})
return web3authProvider
}

const logout = async () => {
const provider = await getWeb3Auth()
await provider.logout()
w3auth = null
}

export const authProvider = { login, logout, getWeb3Auth }
`

  1. Go to 'https://minteo.com/profile'
  2. Follow the registration flow
  3. See error: Inspect network activity

image

Expected behavior

Being able to login and register without problem

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

1 participant