Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@abeisleem
Copy link
Contributor

Important

🔎 Previews:

  • add-onboarding-flow.mdx

Explanation:

It not easy to notice that developers should call user.reload() on the frontend after updating the user's publicMetadata on the backend when following the guide Add custom onboarding to your authentication flow. Making that call is a necessary part of the logic and has security implication depending on the use-case.

Discord issue: https://discord.com/channels/856971667393609759/1253768303483162644

This PR:

  • This PR adds a callout to making a user.reload() function call.
  • Also calls it out in the provided code-block incase it's not read earlier on the page.

@abeisleem abeisleem requested a review from a team as a code owner July 1, 2024 15:18
@abeisleem
Copy link
Contributor Author

cc: @JacobMGEvans

@alexisintech
Copy link
Member

Please remove the callout and update the comment :)

@abeisleem
Copy link
Contributor Author

@alexisintech, thanks for you input :) All suggestions are implemented.

@alexisintech alexisintech changed the title Add callout to user.reload() in add-onboarding-flow.mdx (/guides/add-onboarding-flow) Add code comment that explains user.reload() Jul 2, 2024
@alexisintech alexisintech dismissed JacobMGEvans’s stale review July 2, 2024 14:30

approved by docs

@alexisintech alexisintech merged commit bc0c1d8 into clerk:main Jul 2, 2024
@alexisintech
Copy link
Member

awesome change - thank you so much for pointing this out @abeisleem

@abeisleem abeisleem deleted the pr/user-reload-callout branch July 16, 2024 20:13
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

Successfully merging this pull request may close these issues.

3 participants