supertokens-core
supertokens-core copied to clipboard
Change thirdparty userId to be varcahr(255)
There was an error where someone was trying to sign up using the thirdparty recipe and postgres rejected the query cause of value too long for type character varying(128)
- and in the thidparty table, only the third_party_user_id
column has 128 chars limit.
Error log reference:
https://app.zenhub.com/files/231921809/8968d6d6-bcdd-48d8-aa60-fd556e934acd/download
@jscyo progress on this?
Information around user-id size from Oauth providers is not explicitly mentioned in their docs.
I've found these two answers which say that varchar(128) should be fine for Google and Facebook
Ive contacted Github and Facebook support for more information about this
The OIDC defines that the sub
claim (the user id) cannot exceed 255 ascii character length, so there is a possibility that some providers are issuing user id's which are more than 128 characters. source
@jscyo any updates on this?
See what schema keycloack uses for this
The schema for storing social providers for keycloak is as follows:
Column | Type | Collation | Nullable | Default
--------------------+------------------------+-----------+----------+---------
identity_provider | character varying(255) | | not null |
realm_id | character varying(36) | | |
federated_user_id | character varying(255) | | |
federated_username | character varying(255) | | |
token | text | | |
user_id | character varying(36) | | not null |
Indexes:
They use varachar(255) to store their third party user ids.
Hi @rishabhpoddar ! Is the bug still open to work? I wish to contribute to this as my first ever contribution to OSS. !
hey @Shashwat121! Thanks for showing interest. This issue is being worked on in another PR. Please find another issue that you like. We also have issues in our backend and frontend SDKs :)