1

I am following the ConnectyCube API documentation and it tells me to format an object like this when using Firebase credentials:

 const userCredentials = {
                      provider: 'firebase_phone',
                      firebase_phone[project_id]: projectId,
                      firebase_phone[access_token]: idToken,
                    };

Of course the app won't compile because you can't use square brackets like this, it throws a linting error.

I have tried getting rid of it but it doesn't work, what are they trying to tell me to do?

Mr. Robot
  • 1,334
  • 6
  • 27
  • 79
  • `const userCredentials = {}; userCredentials[firebase_phone[project_id]] = projectId` – tymeJV Aug 14 '19 at 16:20
  • Thanks, gives me `firebase_phone is not defined` – Mr. Robot Aug 14 '19 at 16:29
  • 1
    Looks like a clear case for their [support](https://connectycube.com/contact/). They could have meant anything by that, from `projectId: firebase_phone.project_id` to `"firebase_phone[project_id]": projectId`. – Bergi Aug 14 '19 at 18:57

1 Answers1

1

Fixed - must be written like this:

provider: 'firebase_phone',
                      'firebase_phone[project_id]': "xxxxxxxxxx",
                      'firebase_phone[access_token]': idToken,
Mr. Robot
  • 1,334
  • 6
  • 27
  • 79
  • This one is updated https://developers.connectycube.com/js/authentication-and-users?id=authentication-via-phone-number – Rubycon Aug 15 '19 at 07:39