Skip to content

Conversation

Brutus5000
Copy link

No description provided.

@Brutus5000
Copy link
Author

@julianlam Any feedback?

const userId = await main.getUidByOAuthid(req.params.provider, req.params.oAuthId);
if (!userId) {
helpers.formatApiResponse(404, res);
}
Copy link
Member

Choose a reason for hiding this comment

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

missing a return here

Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, you can return next() in order to invoke the regular api 404 handler. You'll have to add next to the method parameters.

README.md Outdated

### API
If you need to look up the user from your own system, you can use the GET api route `oauth2-multiple/provider/:provider/user/:oAuthId`.
Copy link
Member

Choose a reason for hiding this comment

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

May as well provide the full prefix: /api/v3/plugins/oauth2-multiple...

Copy link
Member

@julianlam julianlam left a comment

Choose a reason for hiding this comment

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

LGTM except for the missing return and doc changes.

@Brutus5000 Brutus5000 force-pushed the feature/user-lookup branch from ab550b8 to 61bf27b Compare March 7, 2025 09:32
@julianlam julianlam merged commit 007923d into NodeBB:main Mar 10, 2025
@julianlam
Copy link
Member

v1.5.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

Successfully merging this pull request may close these issues.

3 participants