great-laptop-90610
08/05/2024, 11:40 AMchilly-king-10285
08/05/2024, 11:40 AMchilly-king-10285
08/05/2024, 11:40 AM?refresh=true
to the appropriate endpoint. The endpoint you use depends on whether you're working with a browser client or an API client. For browser clients, append ?refresh=true
to /self-service/login/browser
. For example: <https://playground.projects.oryapis.com/self-service/login/browser?refresh=true>
For API clients, append ?refresh=true
to /self-service/login/api
. For example: <https://playground.projects.oryapis.com/self-service/login/api?refresh=true>
Refreshing a session updates the authenticated_at
time and won't log the user out, unless another user signs in. If you're implementing a UI, you can force the user to re-authenticate by calling the /self-service/login/browser?refresh=true
endpoint. This is only applicable to the login flow and requires the user to already have a session. Here's an example of how to do this: javascript sdk.createBrowserLoginFlow({ refresh: true })
For more details, you can refer to the [Ory documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-login#refreshing-a-session).