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

add examples of how to get user info from req.auth #1648

Merged
merged 15 commits into from
Oct 31, 2024
Merged

Conversation

victoriaxyz
Copy link
Contributor

@victoriaxyz victoriaxyz commented Oct 23, 2024

Important

🔎 Previews:

Explanation:

This PR:

Copy link

Hey, here’s your docs preview: https://clerk.com/docs/pr/1648

@victoriaxyz victoriaxyz changed the title add examples of getting user info from req.auth add examples of how to get user info from req.auth Oct 23, 2024
Copy link
Member

@royanger royanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Looks good

@victoriaxyz victoriaxyz marked this pull request as ready for review October 28, 2024 17:49
@victoriaxyz victoriaxyz requested a review from a team as a code owner October 28, 2024 17:49
@victoriaxyz
Copy link
Contributor Author

@alexisintech @royanger

I updated the Express example (i.e., removed any type and return): 89c9223

The @types/express 5.0.0v doesn't allow return res.json(). See here.

@royanger
Copy link
Member

@alexisintech @royanger

I updated the Express example (i.e., removed any type and return): 89c9223

The @types/express 5.0.0v doesn't allow return res.json(). See here.

To be clear, you can do res.json() if you want it in the code. If just needs to be one of these two options, at least from I've seen. I haven't tested yet.

return void res.status(400).json({ message: error });
res.status(400).json({ message: error });
return

Did you want to include a res.json() in the example? If you're having trouble getting this working we can Tuple.

Copy link
Member

@royanger royanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@victoriaxyz victoriaxyz merged commit 868fdcb into main Oct 31, 2024
4 checks passed
@victoriaxyz victoriaxyz deleted the vi/docs-9428 branch October 31, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants