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

400 Bad request from google when trying to signin while Whitelabel is supplied to Torus.init() #450

Closed
Wie-CBD opened this issue May 10, 2022 · 3 comments

Comments

@Wie-CBD
Copy link

Wie-CBD commented May 10, 2022

Describe the bug

This ran perfectly :

Torus.init({
    "network": {
        "host": "goerli"
    },
    "showTorusButton": false,
    "buildEnv": "testing",
    "enableLogging": true,
    "whiteLabel": {
        "theme": {
            "isDark": true,
            "colors": {
                "torusBrand1": "#27b18a"
            }
        }
    }
})

And the Torus modal pops up as expected. However, when trying to login with google, it returns this error :

image

To Reproduce
Steps to reproduce the behavior:

  1. run torus.init with these parameters :
{
    "network": {
        "host": "goerli"
    },
    "showTorusButton": false,
    "buildEnv": "testing",
    "enableLogging": true,
    "whiteLabel": {
        "theme": {
            "isDark": true,
            "colors": {
                "torusBrand1": "#27b18a"
            }
        }
    }
}
  1. Initialize torus login
  2. Choose login with google
  3. It'll return 400 bad request error

Expected behavior
Login with google works as expected with whitelabel params supplied

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Brave browser and Google Chrome

Smartphone (please complete the following information):
Not tested on smartphone

Additional context
Was testing on Goerli

@chaitanyapotti
Copy link
Member

Unable to reproduce this.
can you share a minimal reproducible example?

@Wie-CBD
Copy link
Author

Wie-CBD commented May 24, 2022

@chaitanyapotti I was able to reproduce this by assigning an imported .svg file to logoDark or logoWhite - something like this :

import SVGDark from '../asset/svg-dark.svg'
import SVGLight from '../asset/svg-light.svg'

const TORUS_INIT_PARAMS = {
  network: {
    host: 'goerli',
  },
  showTorusButton: false,
  buildEnv:  'testing' ,
  enableLogging: true,
  whiteLabel: {
    theme: {
      isDark: true,
      colors: {
        torusBrand1: '#27b18a',
      },
    },
    logoDark: SVGDark,
    logoLight: SVGLight,
    topupHide: false,
    featuredBillboardHide: false,
    disclaimerHide: true,
    defaultLanguage: 'en',
  },
}

@chaitanyapotti
Copy link
Member

the logos need to be links and not real svgs

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