In our application we are using Trello authentication and authorization flow to get the consent from user. Below is the code sample that we are using for user Trello Authorization.
Once user chosen an account and login, trello is giving control back to my application by calling success call back method "authenticationSuccess". But If user clicks on "DENY" button in authorization screen, then trello is not giving control back to my application. The failure call back method "authenticationFailure" is not executing. Could you please suggest me, how can I get the control back to my App when user clicks on "DENY" button?
It looks like this only happens when using type: "redirect". Here is an example of using type: "popup": https://glitch.com/edit/#!/using-trello-js?path=public/example.js
We'll look into seeing if this is something we can fix. I'll update here when I find out more.
Thank you for the reply. As per Trello documentation, if we set interactive:false, then it doesn't redirect or popup and only uses the stored access token. But in my case, I need to redirect the user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On the initial page-visit you should make the call without interactive: false - this will cause them to be redirected. Once they have selected Accept or Deny, they will be redirected back to your page at which point you should make the call again with interactive: false. If they did select Deny then at this point in time your authenticationFailure will be called.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not redirecting to our page when user selected Deny. It's simple showing page as shown in below image.
This is the issue we are facing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gmanik446 Are you using type: "popup" or type: "redirect" when you see that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gmanik446 I've put together an example project of how to use type: redirect here: https://glitch.com/edit/#!/discreet-minibus?path=public/example.js:6:0.
You will want to call Trello.authorize with interactive: false on page load to see if the user has authorized or not. If they have no authorized, you will want to call Trello.authorize again but this time with interactive: true so that they are redirected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gmanik44 When a user is not logged in and selects Deny when prompted to authorize with an app, we intentionally only show the error message, "Token request rejected." We intentionally do not redirect because then that route would be an open redirect for non-logged-in Trello users and could be abused to phish accounts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gmanik446 For non-logged-in users, no. For logged-in users, control is returned to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.