Anyone out there interested in a discussion about [user|app]_metadata
schema design? For our initial forays into Auth0 we’ve mostly been (not) designing our metadata schema, with the expected results, and recently I’ve started working on cleaning this stuff up. I am by no means an expert so I’d be curious to see what others have done. My initial thoughts involve something like the following:
- Application specific data should be stored in an application specific database, not in Auth0.
- Nonetheless, we include room for application specific data in both
user_metadata
andapp_metadata
.
- Nonetheless, we include room for application specific data in both
- The structure below each application node is not defined (left up to the development team)
user_metadata: {
global_attribute_1: "",
global_attribute_2: [],
global_attribute_3: {},
applications: { # user editable application specific data
application_1: {},
application_2: {},
application_3: {},
}
},
app_metadata: {
global_attribute_1: "",
global_attribute_2: [],
global_attribute_3: {},
permissions: { # application specific roles, groups, scopes, etc
application_1: {},
application_2: {},
application_3: {},
},
applications: { # application specific data, not user editable
application_1: {},
application_2: {},
application_3: {},
}
}