Manage Authenticated User Sessions Via REST API Using Asgardeo React SDK
Hello everyone. In this article let’s discuss how to manage authenticated user sessions with REST API. Asgardeo Session Management API is available for
managing authenticated user sessions.
For this tutorial, we need to have a React application with Asgardeo Integration. You can find how to integrate Asgardeo with the existing react application from my previous article below.
API invocation can be done with httpRequst in Asgardeo Auth React SDK. with httpRequest we don’t need to retrieve tokens to invoke API endpoints because the httpRequest will send the token in the Authorization header of the request by default.
- View all sessions for given authenticated user: GET /sessions
- Delete a session of the authenticated user by session-id:
- Delete all the sessions of the given authenticated user:
As shown above, you can invoke any Session Management API endpoint with httpRequest in Asgardeo React SDK.
Sample use case of Session Management API Invocation with Asgardeo React SDK can be found here.
If you are interested in how we can invoke SCIM2 APIs to manage authenticated user profiles using Asgardeo React SDK, you can find my article about that topic below.
Manage Authenticated User’s Profile Via REST API Using Asgardeo React SDK
Hello everyone. In this article let’s discuss how to manage authenticated user profiles via REST API. Asgardeo SCIM2…
Hope you have got some idea about how to invoke Asgardeo APIs with Asgardeo React SDK. You can find the full source from the working codebase below.
GitHub — DimuthuKasunWP/Demo-Asgardeo-React-SDK-API-Invocation: This is a React sample application…
This is a React sample application with Asgardeo SDK integration. This demonstrates how to invoke SCIM APIS and Session…