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

"User cannot be found" on dashboard for 3rd party users #472

Closed
brentnortham opened this issue Jan 22, 2024 · 1 comment
Closed

"User cannot be found" on dashboard for 3rd party users #472

brentnortham opened this issue Jan 22, 2024 · 1 comment
Assignees

Comments

@brentnortham
Copy link

brentnortham commented Jan 22, 2024

I'm using supertokens core:

You are using SuperTokens Community
SuperTokens Core version: 7.0.16
Plugin Interface version: 4.0.5
Database Plugin name: postgresql
Database Plugin version: 5.0.6
Java version: OpenJDK 15.0.1
Installation directory: /usr/lib/supertokens

With supertokens_python==0.18.6. I'm running with FastAPI fastapi==0.105.0.

I'm using the thirdpartypasswordless recipe. All users after signup appear in the dashboard user list correctly. However users of type thirdparty, when clicked , result in a page that says "User could not be found".

I recorded the SQL queries to my pg database when the page loaded and the following ran. Those prepended with !!! resulted in zero rows. The others were fine. Note this occurs using either my supertokens core OR the hosted version.

SELECT user_metadata FROM auth.st_user_metadata WHERE app_id = 'public' AND user_id = 'ca2ade45-be5c-48b5-b186-cffa0cc05cf4';

SELECT au.user_id, au.primary_or_recipe_user_id, au.is_linked_or_is_a_primary_user, au.recipe_id, aaru.tenant_id, aaru.time_joined FROM auth.st_app_id_to_user_id as au LEFT JOIN auth.st_all_auth_recipe_users as aaru ON au.app_id = aaru.app_id AND au.user_id = aaru.user_id WHERE au.primary_or_recipe_user_id IN (SELECT primary_or_recipe_user_id FROM auth.st_app_id_to_user_id WHERE (user_id IN ('ca2ade45-be5c-48b5-b186-cffa0cc05cf4') OR primary_or_recipe_user_id IN ('ca2ade45-be5c-48b5-b186-cffa0cc05cf4')) AND app_id = 'public') AND au.app_id = 'public';

!!! SELECT user_id, email, password_hash, time_joined FROM auth.st_emailpassword_users WHERE user_id IN ('ca2ade45-be5c-48b5-b186-cffa0cc05cf4' ) AND app_id = 'public';

SELECT user_id, third_party_id, third_party_user_id, email, time_joined FROM auth.st_thirdparty_users WHERE user_id IN ('ca2ade45-be5c-48b5-b186-cffa0cc05cf4' ) AND app_id = 'public';

SELECT user_id, tenant_id FROM auth.st_all_auth_recipe_users WHERE user_id IN ('ca2ade45-be5c-48b5-b186-cffa0cc05cf4') AND app_id = 'public';

!!! SELECT * FROM auth.st_userid_mapping WHERE supertokens_user_id IN ('ca2ade45-be5c-48b5-b186-cffa0cc05cf4');

!!! SELECT * FROM auth.st_emailverification_verified_emails WHERE app_id = 'public' AND user_id IN ('ca2ade45-be5c-48b5-b186-cffa0cc05cf4') AND email IN ('<Redacted email address of selected user');

!!! SELECT user_id, email, phone_number, time_joined FROM auth.st_passwordless_users WHERE user_id IN ('ca2ade45-be5c-48b5-b186-cffa0cc05cf4') AND app_id = 'public';

SELECT session_handle FROM auth.st_session_info WHERE app_id = 'public' AND tenant_id = 'public' AND user_id = 'ca2ade45-be5c-48b5-b186-cffa0cc05cf4' AND expires_at >= '1705758089859';

SELECT sess.session_handle, sess.user_id, sess.refresh_token_hash_2, sess.session_data, sess.expires_at, sess.created_at_time, sess.jwt_user_payload, sess.use_static_key, users.primary_or_recipe_user_id FROM auth.st_session_info AS sess LEFT JOIN auth.st_all_auth_recipe_users as users ON sess.app_id = users.app_id AND sess.user_id = users.user_id WHERE sess.app_id = 'public' AND sess.tenant_id = 'public' AND sess.session_handle = '47a851ad-88e1-44b9-b25c-5ff1d9c81669';

Let me know what other information I can provide.

@rishabhpoddar
Copy link
Contributor

This issue has been fixed in python SDK version >= 0.18.7

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

3 participants