# Authenticating API for users

**URL:** <https://forum.ghost.org/t/authenticating-api-for-users/36422>\
**Category:** Integrations & API\
**Created:** [February 16, 2023, 3:15am UTC](https://forum.ghost.org/t/authenticating-api-for-users/36422 "2023-02-16T03:15:22Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hwlmatt](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/hwlmatt/32/16298_2.png) [@hwlmatt](https://forum.ghost.org/u/hwlmatt)\
**Post date:** [February 16, 2023, 9:17pm UTC](https://forum.ghost.org/t/authenticating-api-for-users/36422/2 "2023-02-16T21:17:25Z")

</div>

You can get a JWT for a logged in user by hitting `/members/api/session/`  
(this is current as of v5, the endpoint on the link below is out of date).

Pass that to app, and have app validate it.  
the Public Key is at ` /members/.well-known/jwks.json`

> [@Use Ghost members auth to log-in to custom app via cookies](https://forum.ghost.org/t/use-ghost-members-auth-to-log-in-to-custom-app-via-cookies/12608/4):
>
> Hey! This is definitely doable but it’s gonna be a hack either way as these are not publicly documented or stable methods. You can either get a JWT for a member and use that to authenticate into your application, but this won’t handle logout when the member logs out of Ghost. Or you can use the cookies like you say, but this will be a little more involved and require your app to be running on the same domain so that the cookies can be shared. External auth with JWT You can make a GET request…

---

_[View the full topic](https://forum.ghost.org/t/authenticating-api-for-users/36422)._
