Trello Authorization not working for some users

Hi everyone,

I have developed a dockerized NodeJS Server which connects our Microsoft Outlook Add-In Mailissa with Trello. For this I have an authorization site which is relying on the Trello Auth script from

https://api.trello.com/1/client.js?key=${myApiKey}

In the past we never had any issues with this. All our customers where able to use this out of the box.
Today I had our first customer who is experiencing problems with it. After he logged in and clicked on “Allow” he is straight redirected back to my authorization site. The log of the NodeJS Server is empty and so is the browser console log… I don’t know if its because of any company setting about third party trello rest api applications or something I can change.

I would appreciate any help, as this is a paying customer of us :pray:

Best regards

Mika

1 Like

Hi Mika,

Trello has recently increased the length of tokens, which may be related to the authorization problem.

Best,
Sandor

Hi Sandor,

thanks for your response. I think this should not be the issue, as no other users experience this and I can also not reproduce this issue atm…

Best regards

Mika

As I tried to fix this for last few hours, I wanted to give a quick update on this…

It is still not working. I’ve created a completly new Trello account and with that user I can reproduce the error. So it seems like it affects more than only one user. The first customer who reported this, has no restrictions in his Trello environment.

I’ve also tried it without it, but I am using the Trello ClientJS as stated in Getting Started with client.js to get the authorization done and access the token from localStorage.
Neither success or error function is called after successfull login and apply… I am using the authorize method with type redirect.

I really don’t know where to go from this now, has anyone experienced anything like this?

hey mika, i’m a dev at trello. just letting you know that we are currently looking into this. we’ll let you know when we have something to share with you.

1 Like

okay, so, i’ve tried taking a look at this. i’m only able to reproduce the error if not calling the authorize function on page load with ‘interactive: false’. worth noting that you only need to do this when using ‘type: redirect’ instead of ‘popup’ (as indicated by this little note in the client.js reference, under ‘error’). did you recently try changing from ‘redirect’ to ‘popup’?
i found this stackoverflow post that has authorization working in a jsfiddle, if that’s more helpful.
otherwise, can you provide me an example return url for your code? i think i have an idea of what could cause this bug but am having difficulty verifying it locally.

Hi @Adriana

what we were using when calling the authorize function, was the following configuration:

  window.Trello.authorize({
      type: 'redirect',
      name: 'Mailissa ',
      scope: {
          read: 'true',
          write: 'true'
      },
      expiration: 'never',
      success: authenticationSuccess,
      error: authenticationFailure
  });

We have now switched to oauth1 so I can no longer provide a live example for you right now. Does this already help you to reproduce? Otherwise we could try to go back and spin up a little dev version for you.

Best regards

Mika

i would appreciate if you could spin up a dev version to see where the auth redirects to. i have a suspicion that we’re truncating tokens incorrectly, thus sending us to an invalid redirect url

Hi @Adriana,

sorry for the late answer. I’ve spun up a dev version for you under Axontic Mailissa and realized that it is working again. Don’t know what changed but I think you will be happy to hear that. I guess I will still stay with oauth1 now, as this has been working without any interruption for me.

Best regards and thanks for your help

Mika