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

Ajax in the backend + login-oauth : Access denied #22

Open
drzraf opened this issue May 28, 2019 · 2 comments
Open

Ajax in the backend + login-oauth : Access denied #22

drzraf opened this issue May 28, 2019 · 2 comments

Comments

@drzraf
Copy link
Contributor

drzraf commented May 28, 2019

I've a plugin making use of Ajax like $.get('/admin/plugins/foo/foo.php', { action: 'info', cc }, null, 'json')
Using normal login it works. But using login-oauth2 the very same requests leads to 403 "Access denied".
How am I expected to modify my plugin's (hooks?) in order to make it work?

@drzraf drzraf changed the title Ajax in the backend + login-oauth Ajax in the backend + login-oauth : Access denied May 28, 2019
@w00fz
Copy link
Member

w00fz commented May 28, 2019

Have you tried passing the withCredentials?

xhrFields: {
   withCredentials: true
}

Also I would double check that cookies are passed through with your jQuery ajax request to ensure the request you are making is sharing the same session informations

@drzraf
Copy link
Contributor Author

drzraf commented May 28, 2019 via email

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