Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token issue #27

Closed
mike-diamond opened this issue Jul 22, 2016 · 1 comment
Closed

Token issue #27

mike-diamond opened this issue Jul 22, 2016 · 1 comment

Comments

@mike-diamond
Copy link

mike-diamond commented Jul 22, 2016

I try to use com api as angular-resource, but I have one issue, Joomla doesn't allow me to log out, it returns me "Invalid token" on a white page and user doesn't log out.
I call to api without key, as I understand the plugin create a token if I do not use key as GET parameter.
When I use key generated for admin, joomla make automatically logging as admin after page refresh and without login-password input!
What I need to fix the problem?

@coolbung
Copy link
Member

Hi Mike,

I believe you are seeing this since you are using the APIs in the browser. Due to the way the login is implemented, if you use the APIs in browser and then open the Joomla site the user will be shown as logged in. This happens since in the browser Joomla's session management triggers the session creation, so the user gets logged in.

The use cases that we've been using are largely to do with Mobile apps, so the session didnt pose an issue.

If you wish to fix this behavior you should look at changing the authentication code in the library
https://github.com/techjoomla/com_api/blob/master/code/site/libraries/authentication.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants