You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issues with the OAuth authentication method in the browser. I would like to authenticate different users in the browser to use Asana API. I need to do this because I would like to create tasks in Asana and have the users as the authors of the tasks. I use the code from
// By default, the redirect URI is the current URL, so for this example
// we don't actually have to pass it. We do anyway to show that you can.
redirectUri: REDIRECT_URI
});
// Configure the way we want to use Oauth. This auto-detects that we're
// in a browser and so defaults to the redirect flow, which we want.
client.useOauth();
// Now call `authorize` to get authorization. If the Oauth token
// is already in the URL, it will pull it out and proceed. Otherwise it
// will redirect to Asana.
client.authorize().then(function(){
// The client is authorized! Make a simple request.
$('#ui').html('Fetching...');
returnclient.users.me().then(function(me){
$('#ui').text('Hello '+me.name);
});
}).catch(function(err){
$('#ui').html('Error: '+err);
});
but unfortunatelly when the new popup window opens there is an error unsupported_response_type: The supported response types are code, id_token, code id_token, and dentity.. The problem is with the response_type=tokenquery parameter in the URL caused by the line at
I found an issue #144 here with some answer but requesting the user to authenticate every hour is not an option for the app I am developing. I wanted to ask if there is really no other way to get this working? I imagine it the same way as FB/Google/... flow works when I authenticate once and it persists for weeks and don't annoy the user every hour/day.
And if there is no workaround or fix for this I would maybe suggest to delete the obsolete examples and the code so people are not confused why it doesn't work.
Thanks in advance for the help and have a nice day 🙂
Hello there :)
I have an issues with the OAuth authentication method in the browser. I would like to authenticate different users in the browser to use Asana API. I need to do this because I would like to create tasks in Asana and have the users as the authors of the tasks. I use the code from
node-asana/examples/oauth/browser/public/redirect.html
Lines 22 to 44 in 0847653
unsupported_response_type: The supported response types are code, id_token, code id_token, and dentity.
. The problem is with theresponse_type=token
query parameter in the URL caused by the line atnode-asana/lib/auth/base_browser_flow.js
Line 76 in 0847653
And if there is no workaround or fix for this I would maybe suggest to delete the obsolete examples and the code so people are not confused why it doesn't work.
Thanks in advance for the help and have a nice day 🙂
\cc @matthias-fi
The text was updated successfully, but these errors were encountered: