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

Selecting authData doesn't work #5365

Open
rihadavid opened this issue Feb 14, 2019 · 10 comments
Open

Selecting authData doesn't work #5365

rihadavid opened this issue Feb 14, 2019 · 10 comments
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@rihadavid
Copy link
Contributor

Issue Description

When querying _User and selecting authData, it's not contained in the response. The workaround is to select _auth_data_facebook instead. But authData should also work.

Steps to reproduce

Try in the API console, for example where={"username":"youruser"}&keys=authData vs where={"username":"youruser"}&keys=_auth_data_facebook

  • Server

    • parse-server version: tested on 2.3.3, 2.8.4, 3.1.2
  • Database

    • MongoDB version: 3.6.6, mlab
    • Localhost or remote server? Both local and SashiDo
@acinader
Copy link
Contributor

acinader commented Feb 14, 2019

are you using the masterkey?

if (obj.className == '_User' && !auth.isMaster) {
delete obj.sessionToken;
delete obj.authData;

@rihadavid
Copy link
Contributor Author

yes I am

@stale
Copy link

stale bot commented Mar 31, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 31, 2019
@rihadavid
Copy link
Contributor Author

Someone should probably look at this easily reproducible bug and try it on the latest version before the stalebot will close it 😉
@dplewis maybe?

@stale stale bot removed the wontfix label Apr 1, 2019
@dplewis
Copy link
Member

dplewis commented Apr 2, 2019

Have you tried with Javascript SDK?

user->get('authData');

@rihadavid
Copy link
Contributor Author

I'm not sure, it's been two months since I was dealing with this issue. Just wanted to notify you about this issue before it gets closed because it's clearly a bug. Unfortunately, I don't currently have time to investigate deeper, hopefully, someone will 🤔

@dplewis
Copy link
Member

dplewis commented Apr 2, 2019

I’ve been using authData a lot recently and this should work. I’ll look into REST API.

@dplewis
Copy link
Member

dplewis commented Apr 10, 2019

@rihadavid
Copy link
Contributor Author

@dplewis I am sorry, what do you mean? An answer to what? 🤔 Were you able to try to reproduce the issue by the steps I provided, in the API console?

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Oct 5, 2021
@mtrezza
Copy link
Member

mtrezza commented Jan 23, 2022

The issue may be because the field authData does not actually exist in the DB, it is synthesized from the _auth_data_* fields in the DB, so a reference to authData does not work in all cases.

See a similar issue where Parse Server does not interpret a reference as expected in this forum thread.

Fixing this is probably pretty simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

No branches or pull requests

4 participants