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

Update 02-calling-an-api.md #10300

Merged
merged 1 commit into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions articles/quickstart/spa/react/02-calling-an-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ You can then include the access token in the authorization header of the API cal

Upon success, you extract the `user_metadata` property from the API response and use `setUserMetadata()` to make React aware of it.

For a more detailed example, see how to [create a `useApi` hook](https://github.com/auth0/auth0-react/blob/master/EXAMPLES.md#create-a-useapi-hook-for-accessing-protected-apis-with-an-access-token) for accessing protected APIs with an access token.

:::panel Checkpoint
Your application will show "No user metadata defined" if you have not set any `user_metadata` for the logged-in user. To further test out this integration, head to the [Users section of the Auth0 dashboard](https://manage.auth0.com/#/users) and click on the user who is logged in. Update the `user_metadata` section with a value like `{ "theme": "dark" }` and click "Save". Refresh your React application and verify that it reflects the new `user_metadata`.
:::
Expand Down
Loading