I have an Angular11 application that I have integrated Auth0-angular library into. I have also created a rule that on login checks to see if user.app_metadata.stripe_customer exists, if it doesn’t exist it then goes about creating a stripe customer with stripes API, a stripe subscription and attaching it to that customer, and then updating user.app_metadata with the stripe customer information. If the stripe_customer exists it will grab the latest information from stripe and update user.app_metadata.stripe_customer with the new data. This functionality works.
I now want to make use of this user.app_metadata in my application. For example, show a user when their subscription ends, or if it has ended redirect them to a page to purchase a new paid subscription. However the code to get the user
this.auth.user$.subscribe(user => {
console.log(user);
console.log(user.app_metadata);
});
When I register or login. user.app_metadata does not exist, and looking through the documentation I don’t see any way within the Auth0-angular library to get this data. Could someone point me in the right direction?