php - Developing Logout functionality for application accessing ASANA -


i working on tool uses php, mysql, , accesses user's asana profile. user authenticated using oauth 2.0 asana api.

the application working fine, issue logout functionality. able logout application, can't erase cookies set asana. (it's okay personal computers, in case of public computers can create issues.)

how logout user asana while he/she logs out of application? tried other posts , saw solutions google api , facebook api members recommended using api's logout links.

i couldn't find such thing asana. direct logout link: https://app.asana.com/-/logout works fine, not able redirect application. suggestions great help.

code current logout functionality:

<?php include_once '../dbapi/dbconnect.php'; session_start();     mysqli_close($conn); session_destroy(); header("location: https://app.asana.com/-/logout") ?> 

thanks;

there no current functionality make process smooth. due fact how work in many possible scenarios not straightforward answer.

i encourage read post on oauth , how relates exact question better understand methodology. put, may not want log user out of asana when log out of application, leave decide :)

instead of logging user out may try warning message when user logs out of application:

"warning: remember log out of asana app"

if want have button logs user out of asana , redirects own website, try implementing iframe this

    <html>     <script>         function logout() {             var = document.createelement('iframe');             i.style.display = 'none';             i.onload = function () {                 i.parentnode.removechild(i);             };             i.src = 'https://app.asana.com/-/logout';             document.body.appendchild(i);         }     </script>     <a href="/logout" onclick="logout();">logout</a>     </html> 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -