sorare / api

Sorare API documentation
155 stars 49 forks source link

How to properly use the subscription "currentUserWasUpdated" #159

Open massiminorossi89 opened 2 years ago

massiminorossi89 commented 2 years ago

Hi,

I am testing this subscription, but it only works when authenticated. How to authenticate my user using wss? what should I pass as a command? subscribe_command = {"command": "subscribe", "identifier": identifier}

Best regards.

mueller1981 commented 2 years ago

Any news here? I tried with the JWT returned from token

signIn(input: $input) {
    currentUser {
      starkKey
      jwtToken(aud: "${aud}") {
        token
        expiredAt
      }
    }

at

const cable = new ActionCable({
  headers: {
     'Authorization': `Bearer <JWT token>`,
  },
});

but getting an unauthorized exception. Is this only working with an oAuth token?