[GH-ISSUE #60] FR: add ability to use built-in authentication for custom routes #19

Closed
opened 2026-05-23 08:38:39 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @donl on GitHub (Dec 7, 2022).
Original GitHub issue: https://github.com/appy-one/acebase-server/issues/60

Looking to be able to use the built-in authentication on endpoints created by server.extend and server.app to check if a request is from an authenticated user or not.

Originally created by @donl on GitHub (Dec 7, 2022). Original GitHub issue: https://github.com/appy-one/acebase-server/issues/60 Looking to be able to use the built-in authentication on endpoints created by `server.extend` and `server.app` to check if a request is from an authenticated user or not.
Author
Owner

@appy-one commented on GitHub (Dec 7, 2022):

You should be able to use req.user for this purpose. If the user is signed in, it will contain the user details, null otherwise.

<!-- gh-comment-id:1341520591 --> @appy-one commented on GitHub (Dec 7, 2022): You should be able to use `req.user` for this purpose. If the user is signed in, it will contain the user details, `null` otherwise.
Author
Owner

@donl commented on GitHub (Dec 7, 2022):

Ahh! That looks perfect! Thanks

<!-- gh-comment-id:1341539482 --> @donl commented on GitHub (Dec 7, 2022): Ahh! That looks perfect! Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase-server#19
No description provided.