Store and retrieve user MetaData in External DB

Hi All,

We are looking to move our user storage in PostresSQL. One of the questions I have is can we store user MetaData in a DB Table and how would we ‘read’ this data when the user is Logging in?

For example for a user joe.bloggs@here.com in Auth0 he currently has the following user_metdata:

{
  "Groups": [
    "Apples",
    "Oranges",
    "Bananas",
    "Peaches"
  ]
}

As an example would could we have a DB Table set out as follows :sweat_smile:

email | Groups
joe.bloggs@here.com | Apples
joe.bloggs@here.com | Oranges
joe.bloggs@here.com | Bananas
joe.bloggs@here.com | Peaches

Can we use the user’s email address as a key field to bring these details through at log-in time?

Any help really appreciated! many thanks,

Fiorano