REST API usage with JMIX defined users

HI,

We have application in Javascript and backand with JMIX. How can we use REST API with users definded in JMIX backend? How get we token for user defined in JMIX and user REST API method?

Thx

Hello,

We have a sample JMIX + React application.

Regards,
Nikita

Thank You. This example is a right one.

1 Like

Hello,

on more question. How can I logout? What is a URL for this action?

Thx

Hello,

You can use standard logout - http://localhost:8080/logout

But in the future we will support logout for auth server:

Regards,
Nikita

Hi @shchienko ,
We are facing the issue, that we are unable to logout using REST API. we are getting the following error:
Screenshot from 2024-10-01 10-31-19

We tried both logout endpoints:

  1. http://localhost:8080/logout

  2. http://localhost:8080/connect/logout

    Both the Logout url is not working. Is there any workaround available for now?

Hello @vimalkumar010,

What version of Jmix are you using? Can you send me the logs?

Regards,
Nikita

Hi @shchienko ,
I am using the JMIX Version: 2.3.3, I have attached the sample Application for your reference.

And I am not getting any error/warning in the console log.

Thanks.
sample-app.zip (133.7 KB)