sso logout

Avatar
  • updated
  • Answered
When a user logs in to our app and they use userEcho, we generate the sso token and log them in to UE. Then when our user logs out of our app, we need to log them out of UE too. How do we do this. (using javascript/node)

How would you rate the customer service you received?

Satisfaction mark by Richard Sawyer 9 years ago

Thanks Sergey.

Add a comment about quality of support you received (optional):

Pinned replies
Avatar
Sergey Stukov co-founder
  • Answer
  • Answered
Check our API Reference we have Logout option
http://userecho.com/dev/api/reference/





Avatar
Richard Sawyer
Changed the access policies eh Vladimir? LOL. OK, got it working now ;)
Avatar
Vladimir Mullagaliyev co-founder
Quote from Richard Sawyer
Hi Sergey,
I'm having trouble with sso logout. I'm sending link like this:
https://userecho.com/api/v2/users/2038462/logout.json?access_token=f5128fc1539450c98d4ff639c39e701fxxxxxxxx
and get response like this:
<html>
<head>
<title>Zurili / Oops! Something went wrong.</title>
<!--<link rel="stylesheet" href="/s/assets/css/font-awesome.min.css">-->
netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
</head>
<body>
<CENTER>
<BR/>
<BR/>
<h1>Oops! Something went wrong.</h1>
<p>
An error occurred on the page. Data sent to the developers. Sorry for the inconvenience.

<br>
<a href='#' onclick="UE.Popin.show();return false;">Send more details to us.</a>
</p>
<i class="fa fa-cogs" style="font-size:240px;color: rgb(222, 106, 89);margin:20px"></i>
<BR/>
<a href='/'>Go to main page.</a>
</CENTER>
<script type='text/javascript'>
var _ues = {
host:'feedback.userecho.com',
forum:'2499',
lang:'en',
...

What am I doing wrong?
Hello Richard,
We've changed our access policy for this method. To have an access to logout any users your key should be created on behalf of staff member who has an access to manage users. You have an Anonymous user in your key which doesn't have access to this method.

Also we've changed error message. Now you will see:
{
    "status": "error", 
    "message": "Not enought access rights"
}

You are able to create new API key here https://zurili.userecho.com/settings/features/api/
Avatar
Richard Sawyer
Hi Sergey,
I'm having trouble with sso logout. I'm sending link like this:
https://userecho.com/api/v2/users/2038462/logout.json?access_token=f5128fc1539450c98d4ff639c39e701fxxxxxxxx
and get response like this:
<html>
<head>
<title>Zurili / Oops! Something went wrong.</title>
<!--<link rel="stylesheet" href="/s/assets/css/font-awesome.min.css">-->
netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
</head>
<body>
<CENTER>
<BR/>
<BR/>
<h1>Oops! Something went wrong.</h1>
<p>
An error occurred on the page. Data sent to the developers. Sorry for the inconvenience.

<br>
<a href='#' onclick="UE.Popin.show();return false;">Send more details to us.</a>
</p>
<i class="fa fa-cogs" style="font-size:240px;color: rgb(222, 106, 89);margin:20px"></i>
<BR/>
<a href='/'>Go to main page.</a>
</CENTER>
<script type='text/javascript'>
var _ues = {
host:'feedback.userecho.com',
forum:'2499',
lang:'en',
...

What am I doing wrong?
Avatar
Sergey Stukov co-founder
  • Answer
  • Answered
Check our API Reference we have Logout option
http://userecho.com/dev/api/reference/