Open fungc-io opened 2 years ago
Actually if all entities in Authgear are using uuid as ID, what if we make it simpler by:
All IDs are UUID, including user ID. But UUID is not enough for GraphQL because GraphQL define a node(id: ID)
field that every GraphQL must implement. That means the ID must tell the type of the node and the ID of the node.
To solve this problem, I want to adapt a similar ID format used by Stripe. The IDs of Stripe looks like prod_NwKkamouCWQvls
which is an ID of a particular Stripe Product. This format encodes the type and also URL safe. Of course this change only applies to new projects.
To solve this problem, I want to adapt a similar ID format used by Stripe. The IDs of Stripe looks like prod_NwKkamouCWQvls which is an ID of a particular Stripe Product. This format encodes the type and also URL safe. Of course this change only applies to new projects.
So it's like user_[UUID]
?
Ya that seems good enough and avoids the trouble/performance of overhead for us to build a global object index
Problem
When communicating with Authgear, developers will see two versions of "id" in different scenario.
userInfo
from SDK, and thesub
of JWT, users are identified by auuid
node_id
which is abase64URLencode("User:"+uuid)
Although a similar design is practiced by GitHub API, this is not natural to a developer, and developers may found it quite strange.
Proposed Changes
uuid
andnode_id
, and remains unchanged for future sign-ups