Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Custom Claims to access app_metadata, data becomes stale #1735

Open
6 tasks done
Jwiggiff opened this issue Apr 23, 2024 · 0 comments
Open
6 tasks done

Using Custom Claims to access app_metadata, data becomes stale #1735

Jwiggiff opened this issue Apr 23, 2024 · 0 comments

Comments

@Jwiggiff
Copy link

Checklist

Description

I am creating a credit-based platform using Stripe and Auth0. I have payment through strip which then hits a webhook where I update the app_metadata using the Auth0 Management Client to update the credits property. However, I am not sure how to get the value to update on the frontend? I add the custom claim through an Action in the Login flow. I have tried customizing the userInfo endpoint using handleProfile with an afterRefetch function that gets the value using the management client. This causes an error with Too Many Requests.

Reproduction

  1. Add custom claim in Action in Login flow
  2. Login to app
  3. Update app_metadata using management client
  4. Custom claim has stale value

Additional context

No response

nextjs-auth0 version

^3.5.0

Next.js version

14.2.1

Node.js version

20.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant